A Brief History of ECMAScript Versions
ECMAScript is a scripting language standardized by Ecma International in ECMA-262 and ISO/IEC 16262. Here's a brief history of ECMAScript versions:
- ECMAScript 1 (1997): The first version of ECMAScript was released in 1997. It introduced basic features such as variables, loops, conditional statements, functions, and exception handling.
- ECMAScript 2 (1998): This version made minor changes to ECMAScript 1, including better error handling, stricter rules for parsing, and more detailed definitions for some language constructs.
- ECMAScript 3 (1999): ECMAScript 3 was a major upgrade, adding support for regular expressions, try/catch statements, and better object handling. It also introduced the JSON data interchange format.
- ECMAScript 4 (never released): ECMAScript 4 was a proposed version that was never released due to disagreements between browser vendors. It aimed to add new features such as classes, modules, and generators.
- ECMAScript 5 (2009): This version introduced several new features, including strict mode, JSON improvements, and support for getters and setters. It also added new array functions such as forEach, map, and reduce.
- ECMAScript 6 (2015): ECMAScript 6, also known as ES6 or ECMAScript 2015, was a major update that added many new features, including let and const declarations, arrow functions, classes, template literals, and destructuring.
- ECMAScript 7 (2016): ECMAScript 7, also known as ES7 or ECMAScript 2016, added only a few new features, including Array.prototype.includes and the exponentiation operator.
- ECMAScript 8 (2017): ECMAScript 8, also known as ES8 or ECMAScript 2017, introduced features such as async/await, Object.values/Object.entries, and String padding.
- ECMAScript 9 (2018): ECMAScript 9, also known as ES9 or ECMAScript 2018, added features such as spread properties, rest properties, and asynchronous iteration.
- ECMAScript 10 (2019): ECMAScript 10, also known as ES10 or ECMAScript 2019, added features such as Array.prototype.flat and Array.prototype.flatMap, as well as improvements to the existing RegExp and Unicode support.
- ECMAScript 11 (2020): ECMAScript 11, also known as ES11 or ECMAScript 2020, added only a few new features, including String.prototype.matchAll and Promise.allSettled.
- ECMAScript 12 (2021): ECMAScript 12, also known as ES12 or ECMAScript 2021, added features such as Logical Assignment Operators, String.prototype.replaceAll, and Promise.any.
- ECMAScript 13 (2022): ECMAScript 13, also known as ES13 or ECMAScript 2022. This version introduces top-level await, allowing the keyword to be used at the top level of modules; new class elements: public and private instance fields, public and private static fields, private instance methods and accessors, and private static methods and accessors.