ES6 in detail: introduction

Original author: jorendorff
  • Transfer
ES6 in detail
Welcome to the ES6 in detail series! In this weekly series of articles, we will explore ECMAScript 6, the new upcoming JavaScript language specification. ES6 has many new features that make JS more powerful and expressive, and every week we will consider these features. But before we get started, it would be nice to talk about what ES6 is and what to expect from it.

What is ECMAScript responsible for?


JavaScript is standardized by the ECMA organization (like W3C), and the standard itself is called ECMAScript. ECMAScript defines the following:


What ECMAScript does not define is all that is related to  HTML and  CSS , as well as all kinds of web APIs , such as the DOM . All this is defined by separate standards. ECMAScript covers those aspects of language that are not only in browsers, but also in platforms like node.js .

New standard


A couple of weeks ago, the final version of the sixth edition of the ECMAScript specification was submitted for approval to Ecma General Assembly. What does this mean?

This means that this summer we will have a new standard for the JavaScript language.

This is great news. The new JS specification does not fall from heaven every day. The latest specification, ES5, was adopted in 2009. The ES standard committee has since been working on ES6.

ES6 is a major release of the new version of the language. At the same time, your old code will continue to work. ES6 provides maximum compatibility with already written code. By the way, many browsers now support some features of ES6, and work on the implementation of other features continues. This means that all your code works in browsers with implemented parts of ES6! If you have not observed compatibility issues (but you have not), then they will not appear in the future.

Count to 6


Previous editions of the ECMAScript standard were numbered 1, 2, 3, and 5.

What happened to the fourth revision? The ECMAScript 4 edition was planned, and a lot of work was done on it, but in the end it was abandoned as being too ambitious. (For example, it had sophisticated built-in static typing).

The fourth edition of ECMAScript was highly controversial. When the standards committee finally stopped working on it, committee members decided to publish a relatively modest version of ES5. After that, they decided to continue work on more important new features. That is why the sixth edition of ECMAScript is called “Harmony” and contains these two sentences in the specification:

ECMAScript is a dynamic language, and its evolution has not yet ended. Future versions of this specification will introduce significant technical improvements.

This statement can be considered a kind of promise.

Promises made


In ES5, updated in 2009, it was presented Object.create(), Object.defineProperty(), getters and setters , a strict regime ( strict mode ) and a JSON object. I used all these features and I liked what ES5 did for the language. I have no words to describe how these innovations have had an impact on how I write JS code . The most important new feature for me were the new array methods: .map(), .filter()and the like.

And ECMAScript 6 is quite different. This is the result of many years of well-coordinated work. And this is a treasure of new language features. The most significant JS update that has ever been . New features range from simple amenities like arrow functionsand string interpolation to brain-exploding concepts like proxies and generators.
The goal of this series is to look at new features to show you how ES6 will radically change your code.
We will start with features that many have been waiting for a long time - ES6 iterators and a new cycle for-of. See you next week!

Also popular now: