Datasheet

Chapter 1: What Is JavaScript?
4
ECMAScript is simply a description of a language implementing all of the facets described in the
specification. JavaScript implements ECMAScript, but so does Adobe ActionScript and OpenView
ScriptEase (see Figure 1 - 2 ).
EMCAScript
JavaScript ActionScript ScriptEase
Figure 1 - 2
ECMAS cript Editions
The different versions of ECMAScript are defined as editions (referring to the edition of ECMA - 262 in
which that particular implementation is described). The most recent edition of ECMA - 262 is edition 4,
released in 2007. The first edition of ECMA - 262 was essentially the same as Netscape s JavaScript 1.1, but
with all references to browser - specific code removed and a few minor changes: ECMA - 262 required
support for the Unicode standard (to support multiple languages) and that objects be platform -
independent (Netscape JavaScript 1.1 actually had different implementations of objects, such as the
Date object, depending on the platform). This was a major reason why JavaScript 1.1 and 1.2 did not
conform to the first edition of ECMA - 262.
The second edition of ECMA - 262 was largely editorial. The standard was updated to get into strict
agreement with ISO/IEC - 16262 and didn t feature any additions, changes, or omissions. ECMAScript
implementations typically don t use the second edition as a measure of conformance.
The third edition of ECMA - 262 was the first real update to the standard. It provided updates to string
handling, the definition of errors, and numeric outputs. It also added support for regular expressions,
new control statements,
try - catch exception handling, and small changes to better prepare the
standard for internationalization. To many, this marked the arrival of ECMAScript as a true
programming language.
The fourth edition of ECMA - 262 was a complete overhaul of the language. In response to the
popularity of JavaScript on the Web, developers began revising ECMAScript to meet the growing
demands of web development around the world. In response, ECMA TC39 reconvened to decide the
future of the language. The resulting specification defined an almost completely new language based on
the third edition. The fourth edition includes strongly typed variables, new statements and data
structures, true classes and classical inheritance, as well as new ways to interact with data (this is
discussed in Chapter 22 ).
As an alternate proposal, a specification called ECMAScript 3.1 was developed as a smaller evolution
of the language by a subgroup of TC39, who believed that the fourth edition was too big of a jump for
the language. The result was a smaller proposal with incremental changes to the languages (discussed in
Chapter 22 ).
c01.indd 4c01.indd 4 12/8/08 11:21:50 AM12/8/08 11:21:50 AM