DEV Community

Ben ltaif
Ben ltaif

Posted on • Edited on

ECMAScript: all versions and new features

Since its creation in 1997, ECMAScript, also known as JavaScript, has undergone many updates and evolutions. Here is a list of all major versions of ECMAScript, with an overview of the new features introduced in each version:

ECMAScript 1 (1997):

The first version of ECMAScript was released in 1997. It contains only a few basic features, like variables, functions and loops.

ECMAScript 2 (1998):

The second version of ECMAScript is released in 1998. It contains only minor changes compared to the first version.

ECMAScript 3 (1999):

The third version of ECMAScript is released in 1999. It adds many new features, such as try/catch for error handling, new comparison operators and regular expressions.

ECMAScript 4 (discontinued):

The fourth version of ECMAScript was under development, but was eventually abandoned due to differences of opinion about the direction of the language.

ECMAScript 5 (2009):

The fifth version of ECMAScript was released in 2009. It adds many new features, such as support for strict objects, the definition of read-only properties and the ability to define methods directly on objects.

ECMAScript 6 (2015),also known as ECMAScript 2015:

Since its release in 2015, ECMAScript 6, also known as ECMAScript 2015, has brought many new features and improvements to JavaScript. Here are some of the most important new features of ECMAScript 6:

→ Classes: ECMAScript 6 introduces the concept of classes in JavaScript, which makes it easier to create objects and manage inheritance.

→ Default parameters: ECMAScript 6 allows to define default parameters for functions, which can be useful when you want to use a default value if no arguments are provided.

→ Arrow functions: ECMAScript 6 introduces arrow functions, which are a more concise syntax for writing anonymous functions.

→ Repeat operator (spread): The spread operator allows you to break an array into individual arguments when calling a function, or to merge multiple arrays into one.

→ Template literals: ECMAScript 6 introduces the syntax of “template literals”, which are a simpler and more flexible way to interpolate strings.

→Const and let: ECMAScript 6 introduces the const and let keywords, which are used to declare variables. The main difference between const and let is that the value of a variable declared with const cannot be modified, while the value of a variable declared with let can be modified.

ECMAScript 7 (2016), also known as ECMAScript 2016:

The seventh version of ECMAScript is released in 2016. It adds some interesting new features:

→ Exponentiation : ECMAScript 7 introduces the exponentiation. operator*, which allows you to calculate the power of numbers. For example, 2 *3 will return 8.

→ The includes() method: ECMAScript 7 adds the includes() method to strings and arrays, which allows you to check if an element exists in the string or array.

→ Rest/spread objects: ECMAScript 7 introduces the “rest/spread objects” syntax, which allows you to easily break up and merge objects.

→ Async/await: ECMAScript 7 introduces the async/await syntax, which allows you to write asynchronous code in a more concise and readable way.

ECMAScript 8 (2017), also known as ECMAScript 2017:

The eighth version of ECMAScript is released in 2017. It adds many new features:
→ Unicode strings: ECMAScript 8 adds support for Unicode strings, which means you can use characters from any language in your strings.

→ Array methods: ECMAScript 8 adds many new methods to arrays, such find() , findIndex() , includes() , flat() , flatMap(), which make it easier to find and manipulate data in arrays.
→ Trailing commas: ECMAScript 8 allows trailing commas in function and array declarations.

→ Async/await: ECMAScript 8 improves the async/await syntax, which allows you to write asynchronous code in a more concise and readable way.

In conclusion, ECMAScript has seen many updates and evolutions over the years, which have added new features and improved the language.

If you are a web developer, it is important to follow the evolutions of ECMAScript and to take the time to familiarize yourself with the new features introduced in each version.

Top comments (0)