ECMAScript 6 Complete Tutorial

JavaScript is a superset of ECMAScript scripting language. ECMAScript forms the language base for JavaScript, JScript and ActionScript. In this tutorial series we will look at ECMAScript 6, a new version of ECMAScript providing a new set features and fixes to JavaScript.

ECMAScript6 is also called as “ES6″, “Harmony” and “ES.next”.

Categorizing ES6 Features

All the new features of ES6 can be categorized in 7 categories. Here is the list of categories:

Variables and Parameters

Classes

Proxies

Build-in Objects and Prototype based features

Promises

Reflect API

Modules

Iterators and Generators

ECMAScript 6 Compatibility

Kangax has created a ES6 compatibility table which lists the ES6 features and browsers which support or don’t support them.

You can also use caniuse.com to find the support of various ES6 features on various different browsers.

Running ECMAScript 6 in an Incompatible Browser

If you are writing ES6 for your website on development phase then you can embed the Traceur compiler in your webpages which will compile the ES6 to simple browser supportable JavaScript code on the fly in the browser.

On production site compiling ES6 to browser supportable JS on every page load can be a resource & time consuming task and can effect the site performance. Its recommend that you use Traceur’s node compiler to compile once for all time and embed the compiled JS in your pages.

If you don’t like this compile idea then you can use ES6 polyfills. Polyfill is not available for every ES6 feature.

This series just provides an overview of some important and most used ES6 features. If you want to learn ES6 in depth they you can get my book Learning ECMAScript 6 which is published by Packt.

To create code blocks or other preformatted text, indent by four spaces:

This will be displayed in a monospaced font. The first four
spaces will be stripped off, but all other whitespace
will be preserved.
Markdown is turned off in code blocks:
[This is not a link](http://example.com)