1.2 What JavaScript Is Not

JavaScript is not Java. Java was developed at Sun Microsystems. JavaScript was developed at Netscape. Java applications are independent of a Web page whereas JavaScript programs are embedded in a Web page and must be run in a browser window. [2] Java is a strongly typed language with strict guidelines while JavaScript is loosely typed and flexible. Java data types must be declared. JavaScript types such as variables , parameters, and function return types do not have to be declared. Java programs are compiled. JavaScript programs are interpreted by a JavaScript engine that lives in the browser

[2] The JavaScript interpreter is normally embedded in a Web browser, but is not restricted to the browser. Servers and other applications can also use the JavaScript interpreter.

JavaScript is not HTML, but JavaScript code can be embedded in an HTML document and is contained within HTML tags. JavaScript has its own sytax rules and expects statements to be written in a certain way. JavaScript doesn't understand HTML, but it can contain HTML content within its statements. All of this will become clear as we proceed.

JavaScript is object based but not strictly object oriented because it does not support the traditional mechanism for inheritance and classes found in object-oriented programming languages, such as Java and C++. The terms private, protected, and public do not apply to JavaScript methods as with Java and C++.

JavaScript is not the only language that can be embedded in an application. VBScript, for example, developed by Microsoft, is similar to JavaScript, but is embedded in Microsoft's Internet Explorer.

JavaScript by Example
JavaScript by Example (2nd Edition)
ISBN: 0137054890
EAN: 2147483647
Year: 2003
Pages: 150
Authors: Ellie Quigley

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net