Versions of JavaScript

JavaScript has been around since the mid-1990s and has undergone many changes and updates over the years. cript include:

ECMAScript

ECMAScript is a scripting language standard that defines the syntax, semantics, and features of JavaScript. It was created to standardize the various implementations of JavaScript, ensuring that the language is consistent across different platforms and browsers.

The ECMAScript standard is maintained by the Ecma International organization, which is responsible for the development and standardization of several other technologies, including the JSON data format and the C# programming language.

The current version of ECMAScript is ECMAScript 2021 (also known as ECMAScript 12 or ES2021), which was released in June 2021. Each new version of ECMAScript introduces new features and improvements to the language, such as new syntax, new methods, and new data types.

Some of the most notable features introduced in recent versions of ECMAScript include:

  • Arrow functions: A shorthand syntax for writing functions in JavaScript.
  • Promises: An abstraction over asynchronous operations that simplifies working with asynchronous code.
  • Classes: A new way to define objects in JavaScript, with support for inheritance and other features common to object-oriented programming languages.
  • Modules: A way to organize and share code between different files and components in a web application.
  • ECMAScript is an important part of web development, as it defines the language used to create client-side functionality on the web. JavaScript is the most popular implementation of ECMAScript, but there are other implementations as well, such as Microsoft's TypeScript and Mozilla's SpiderMonkey.

JavaScript 1.0:

The first version of JavaScript was released in 1995, and it included basic language features such as variables, functions, and loops.

JavaScript 1.1:

Released in 1996, this version added support for regular expressions and improved error handling.

JavaScript 1.2:

Released in 1997, this version introduced support for frames, new data types such as the Boolean and the Date, and the ability to create cookies.

JavaScript 1.3 (ECMAScript 1):

Released in 1998, this version introduced support for try/catch exception handling, named function expressions, and the ability to create regular expressions with the RegExp constructor.

JavaScript 1.4 (ECMAScript 2):

Released in 1999, this version added support for dynamic HTML, including the ability to change the content of a web page without reloading it.

JavaScript 1.5 :

Released in 2000, this version introduced many new language features, such as the forEach loop, the Array.map method, and the strict mode, which is a way to opt-in to a stricter version of the language.

JavaScript 1.6 (ECMAScript 3):

Released in 2005, this version added support for Array.forEach, Array.reduce, and Array.every methods, as well as other new features such as the Array.indexOf method and the JSON object.

JavaScript 1.7 (ECMAScript 3):

Released in 2006, this version introduced generators, which are a way to create iterators in JavaScript.

JavaScript 1.8 (ECMAScript 5):

Released in 2008, this version introduced support for string interpolation, block scope with the let and const keywords, and the ability to create anonymous functions with the function keyword.

ES2015 or ES6

ES6 is the sixth major version of ECMAScript, which was released in 2015. It introduced many new features to the language, including:

  • Arrow functions: A shorthand syntax for writing functions in JavaScript.
  • Promises: An abstraction over asynchronous operations that simplifies working with asynchronous code.
  • Classes: A new way to define objects in JavaScript, with support for inheritance and other features common to object-oriented programming languages.
  • Modules: A way to organize and share code between different files and components in a web application.

ES2016 or ES7

ES2016 is the seventh major version of ECMAScript, which was released in 2016. It introduced many new features to the language, including:

  • Array.prototype.includes: A method that checks whether an array contains a given value.
  • Exponentiation operator: A new operator that allows you to raise a number to a power.

ES2017 or ES8

ES2017 is the eighth major version of ECMAScript, which was released in 2017. It introduced many new features to the language, including:

  • Shared memory and atomics: A new way to share data between different threads in JavaScript.

ES2018 or ES9

ES2018 is the ninth major version of ECMAScript, which was released in 2018. It introduced many new features to the language, including:

  • Asynchronous iteration: A new way to iterate over asynchronous data.
  • Object rest/spread properties: A new way to copy and merge objects.
  • Promise.prototype.finally: A method that allows you to run a function after a promise is settled.

ES2019 or ES10

ES2019 is the tenth major version of ECMAScript, which was released in 2019. It introduced many new features to the language, including:

  • Object.fromEntries: A method that converts an array of key/value pairs into an object.
  • Symbol.prototype.description: A property that returns the description of a symbol.
  • JSON superset: A new way to serialize and deserialize data in JavaScript.

ES2020 or ES11

ES2020 is the eleventh major version of ECMAScript, which was released in 2020. It introduced many new features to the language, including:

  • BigInt: A new data type that allows you to represent integers larger than 2^53 - 1.
  • Promise.allSettled: A method that returns a promise that resolves when all of the given promises have either fulfilled or rejected.
  • String.prototype.matchAll: A method that returns an iterator that iterates over all matches of a regular expression in a string.
  • globalThis: A global variable that provides a standard way to access the global object.
  • import.meta: A property that provides information about the current module.
  • Optional chaining: A new way to access properties of nested objects.
  • Nullish coalescing operator: A new operator that returns the right-hand side operand when the left-hand side operand is null or undefined.
  • Dynamic import(): A new way to import modules dynamically.
  • String.prototype.replaceAll: A method that replaces all occurrences of a substring in a string.

ES2021 or ES12

ES2021 is the twelfth major version of ECMAScript, which was released in 2021. It introduced many new features to the language, including:

  • String.prototype.replaceAll: A method that replaces all occurrences of a substring in a string.
  • Logical assignment operators: A new way to assign values to variables.
  • String.prototype.replaceAll: A method that replaces all occurrences of a substring in a string.
  • Logical assignment operators: A new way to assign values to variables.
  • Numeric separators: A new way to make numbers more readable.

ESNext

ESNext is the name of the next version of ECMAScript. It is used to refer to features that are not yet part of the ECMAScript standard, but are already implemented in some browsers or JavaScript engines.

  • Promise.allSettled: A method that returns a promise that resolves when all of the given promises have either fulfilled or rejected.