ECMAScript 6 features

ECMAScript 6, otherwise called ECMAScript 2015, is the most recent form of the ECMAScript standard. ES6 is an important upgrade to the language, and the first update to language since the release of ES5.1 in June 2011

A few of the new features of ES6 are:

  • Arrow functions
  • Classes
  • Enhanced object literals
  • Destructuring assignment
  • Extended parameter handling
  • Generator
  • Modules
  • Proxy

We will look at all these functions in the upcoming sections.

Arrow functions

Arrow functions are also known as fat arrow functions. It is a function and is similar to what we use in C#, Java, and Coffee Script. Statements and expression bodies are supported by arrows. The lexical of arrows is similar to its surrounding code. This is not the case in functions. ...

Get Web Developer's Reference Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.