Sunday, February 25, 2007

JavaScript Language Fundamentals

The following points are core principles of JavaScript:
Excess white space is ignored when outside of a regular expression literal or string.
Statements are terminated with a semicolon.
Semicolons are automatically inserted on lines with complete statements. (Returns imply semicolons for complete statements.)
Data is weakly typed.
References to identifiers are resolved using lexical (static) scoping. The one exception to this is class properties of the RegExp object, which are dynamically scoped.
Indices are enumerated beginning with zero.
There are four kinds of available objects: built-in objects, host (browser) objects, document objects and user-defined objects.
It is a prototype-based object oriented language (not class-based in its current incarnation).
Source code is interpreted.
Comments use C++ inline comment style // or C-style block comment /* */.
I/O is limited in most cases to interaction with Web documents and the user (no local filesystem or network access by default).

No comments :