ECMAScript is a neutral language that is neutral in that it is not related to the environment (host environment) (client/server/browser), it is just a language in pure sense.
ECMAscript-262 defines the basis of the language, or rules (such as the language syntax, what the underlying type is, how the type is transformed, the behavior of the variable, the function behavior), as if an interface is defined.
How to implement these rules is the host environment thing, of course, the host environment not only to implement the rules of the definition, will also use these rules to do some specific things, these things are not defined in the ECMAScript extension.
For example, JavaScript in a Web browser:
Javascript = ECMAscript + DOM + BOM
- ECMAscript: Language Core
- DOM: Document Object Model (manipulating HTML page content)
- BOM: Browser object Model (action browser behavior)
In addition to JavaScript, there are other hosting environments that implement ECMAScript, such as Adobe's ActionScript. (is the language defined as writing a poem or a novel?) )
Digression: How to define the rules is not an easy thing, especially when this rule is a language, these rules to each other, can not contradict each other, the rule definition too strong will lose flexibility, the definition is too weak will not be rigorous unsafe, these are directly affect the language of the development and future, how to grasp this degree is an art.
Version
- ECMAscript v1: Just Netscape Javascript1.1 remove the browser part of the code.
- Ecamscript V2: Only the first edition of the editing process, not as a standard for compatibility.
- Ecamscript v3: The first real change to the standard, string processing, error definitions, numeric output, regular expressions, control statements, exception handling, this becomes a real language.
- Ecamscript V4: Basically defines a new language, strong type, new statement, new data structure, real class, classic inheritance, data interaction mode.
- Ecamscript v3.1: The organizing committee thinks 4 changes too big! 3.1 of alternative suggestions were made, and 4 were abandoned without release.
- Ecamscript V5: Clarification of the known ambiguity in 3, adding new features: JSON object, inherited method, advanced attribute definition, strict mode.
Currently JavaScript in the browser is compatible with V5 (Ie9,firefox4,chrome,safari)
ECMAscript V.s. Javascript