What is ECMAScript?
What is ES? Version History
ES is just a shortcut for ECMAScript. Each edition of ECMAScript receives an abbreviation of ES followed by its number. There are 8 versions of ECMAScript in total. ES1 was released in June 1997, ES2 in June 1998, ES3 in December 1999, and the ES4 version was never adopted. We will not delve into these versions, since they are morally obsolete, and consider only the last four.
ES5 was released in December 2009, 10 years after the third edition. Among the changes include:
- support for strict mode (strict mode);
- the ability to use reserved words as property keys and put commas at the end of the array;
- multiline string literals;
- new functionality in the standard library;
- JSON support.
Version ES6 / ES2015 was released in June 2015. It also caused some confusion about the package name, since ES6 and ES2015 are one and the same. With the release of this update package, the committee decided to move to annual updates. Therefore, the publication was renamed ES2015 to reflect the year of release. Subsequent versions are also named according to their release year. The following changes have been made to this update:
- added restructuring assignment ;
- arrow functions added ;
- You can declare strings in patterned strings using
`(backquotes). Pattern lines can be multi-line, they can also interpolate;
varfor declaring variables. Added “temporary dead zone”;
- The iterator and iteration protocol now determine how to iterate through any object, not just arrays.
Symbolused to assign an iterator to an object;
- Added function generators. They use
yieldto create a sequence of elements. Generator functions can be used
yield*for delegation to another generator function, in addition, they can return a generator object that implements both protocols;
- added promises.
ES2016 (ES7) was released in June 2016. Among the changes in this version of ECMAScript include:
- exponentiation operator
Array.prototype.includesthat checks if the passed argument is in an array.
After another year comes version ES2017 (ES8). This standard received the following changes:
- asynchrony is now officially supported (
- “Hanging” commas in the parameters of functions. Added the ability to put commas at the end of the function argument list;
- Added two new methods for working with strings:
padEnd(). The method
padStart()substitutes additional characters on the left before the beginning of the line. And
padEnd(), in turn, on the right, after the end of the line;
- a function is added
Object.getOwnPropertyDescriptors()that returns an array with descriptors of all the object’s own properties;
- Added memory and object sharing
As for ES.Next, this term is dynamic and automatically refers to a new version of ECMAScript. It is worth noting that each new version brings new features for the language.
- ECMAScript is published annually;
- the first service packs were called ES1, ES2, ES3, ES4, ES5;
- new issues (starting in 2015) were named ES2015, ES2016, ES2017 (abbreviation ES + year of release);