Later the core part of the language became standardized by ECMA and is named “ECMAScript. “
- ECMAScript: core syntax and semantics
- DOM (Document Object Model): Document structure and navigation
- BOM (Browser Object Model): Browser specific information
ECMAScript defines the language itself but not the host environment.
DOM is an API (Application Programming Interface) for XML. DOM defines the document using hierarchical elements.
- Level 1 (1998) : Core (structure and navigation)
- Level 2 (2000) : Views, Events, Style
- Level 3 (2004) : Load/Save, Validation
BOM is the least standardized area. In web browsers, the “window” is the main (global) object through which you can access all browser-related information.
- history: the URLs that have been visited before and after the current page
- location: the current URL of the browser window
- navigator: the object about the browser information
- screen: the user’s screen object
- ECMAScript defines the core part of the language. But it is not host-dependent. It does not know anything about HTML or browsers.
Versions of ECMAScript
The first version is released in 1997.
- Version 1: 1997
- Version 2: 1998
- Version 3: 1999
- Version 4: Abandoned
- Version 5: 2009
- Version 5.1: 2011
- Version 6 (ES6): 2015
- Version 7: 2016
- Version 8: 2017
- Version 9: 2018
- Version 10: 2019
- Version 11: 2020
The third version had been used widely until ECMAScript5 was released.
ECMA3 introduced the following features:
- Regular expressions
- Exception handling (try/catch)
- Tighter definition of errors
- Formatting for numeric output
The version 5 of ECMAScript adds:
- Strict mode
- “JSON” object : JSON.parse() / JSON.stringify()
- “Object” object : reflection methods are added
- Getters and Setters
This version was initially known as ES6 (still widely used) and later renamed “ECMAScript2015”. It introduced significant syntax changes.
- Classes and Modules
- Iterators and for/of loops
- Arrow functions
- Collections (maps, sets, and weak maps)
- Spread operators
- Exponential Operator (**)
- spread operator
- rest parameters
- asynchronous iteration
- changes to Array.sort
- BigInt primitive type for arbitrary-sized integers
- nullish coalescing operator
- the globalThis object
Browser Support for ECMAScript
Please refer to the following sites