JavaScript Editor JavaScript Debugger     JavaScript Editor 



Team LiB
Previous Section Next Section

Appendix A: Core Syntax Quick Reference

The syntax of core language features is covered in this section. The data here is intended for use as a quick reference and examples will be kept to a minimum. For a more complete discussion of each item, see the appropriate chapter of the book. Our conventions will be

You can find the full specification for ECMAScript, which is the core of JavaScript, at www.ecma.ch, currently at http://www.ecma-international.org/publications/standards/Ecma-262.htm. Note, however, that there may be some slight aspects to the language discussed in this appendix that are part of the ad hoc standard implemented by browser vendors and not found in the ECMA specification.

Language Fundamentals

The following points are core principles of JavaScript:

Language Versions

The versions of the various core languages and their relationships are listed in Tables A-1 through A-6.

Table A-1: Standard Versions of JavaScript

Standard Version

Description

ECMAScript Edition 1

First standardized version of JavaScript, based loosely on JavaScript 1.0 and JScript 1.0.

ECMAScript Edition 2

Standard version correcting errors within Edition 1 (and some very minor improvements).

ECMAScript Edition 3

More advanced language standard based on ECMAScript Edition 2. Includes regular expressions and exception handling. In widespread use.

ECMAScript Edition 4

New standard still unfinished at the time of this writing.

Table A-2: Correspondence Between Netscape Language and Browser Versions

Language Version

Browser Version

JavaScript 1.0

Netscape 2

JavaScript 1.1

Netscape 3

JavaScript 1.2

Netscape 4.0–4.05

JavaScript 1.3

Netscape 4.06–4.7

JavaScript 1.4

None

JavaScript 1.5

Netscape 6/7, Mozilla 1.0

JavaScript 2.0

Future versions of Mozilla-based browsers

Table A-3: Correspondence Between Microsoft Language and Browser Versions

Language Version

Browser Version

JScript 1.0

Internet Explorer 3.0

JScript 3.0

Internet Explorer 4.0

JScript 5.0

Internet Explorer 5.0

JScript 5.5

Internet Explorer 5.5

JScript 5.6

Internet Explorer 6.0

Table A-4: Approximate Correspondence Between Netscape and Microsoft Implementations

Language Version

Browser Version

Language Version

Browser Version

JavaScript 1.0

Netscape 2.0

JScript 1.0

Internet Explorer 3.0

JavaScript 1.3

Netscape 4.06

JScript 3.0

Internet Explorer 4.0

JavaScript 1.5

Netscape 6/7, Mozilla

JScript 5.5,5.6

Internet Explorer 5.5,6.0

Language Standards Conformance

Table A-5: Relationship Between Netscape JavaScript and ECMAScript

Netscape Version

Standard Version

Exceptions

JavaScript 1.0–1.2

Very loose conformance to ECMA-262 Edition 1

Many, especially with the Date object, and many extra features

JavaScript 1.3

Strict conformance to ECMA-262 Edition 1

Includes some extra features

JavaScript 1.4

Strict conformance to ECMA-262 Edition 1

Includes some extra features

JavaScript 1.5

Strict conformance to ECMA-262 Edition 3

Includes some extra features

JavaScript 2.0

Planned conformance to ECMA-262 Edition 4

Unknown

Table A-6: Relationship Between Microsoft JScript and ECMAScript

Microsoft Version

Standard Version

Exceptions

JScript 1.0

Very loose conformance to ECMA-262 Edition 1

Many, and some extra features

JScript 3.0

Strict conformance to ECMA-262 Edition 1

Includes some extra features

JScript 5.0

Strict conformance to ECMA-262 Edition 1

Includes many extra features

JScript 5.5

Strict conformance to ECMA-262 Edition 3

Includes some extra features

JScript 5.6

Strict conformance to ECMA-262 Edition 3

Includes some extra features


Team LiB
Previous Section Next Section


JavaScript Editor JavaScript Debugger     JavaScript Editor


©