ES6 (ES2015)
ES6, officially ECMAScript 2015 (ES2015), is the sixth edition of the JavaScript language standard, adopted by Ecma International in June 2015.
The edition was the first major revision of ECMAScript since ES5 in 2009. It was also the first edition whose official title included the year. From ES2016 onward, TC39 has published a new edition every year and named it after that year, so ES6 is the last edition widely known by its number.
ES2015 added much of the syntax that modern JavaScript relies on. That includes block-scoped let and const declarations, arrow functions, class declarations, template literals, destructuring, and modules.
It also introduced promises, iterators, generators, and built-ins such as Map, Set, and Symbol.
Engines shipped these features gradually. In the meantime, projects used transpilers such as Babel to turn ES2015 code into ES5 for older browsers, and polyfills to fill in missing built-ins.
Example
Say a pull request adds a short snippet that totals a shopping cart. Nearly every line uses ES2015 syntax, including a class, block-scoped declarations, destructuring, an arrow function, and a template literal:
> class Product {
… constructor(name, price) {
… this.name = name;
… this.price = price;
… }
… }
undefined
> const cart = [new Product("Lamp", 40), new Product("Desk", 120)];
undefined
> const total = cart.reduce((sum, { price }) => sum + price, 0);
undefined
> `${cart.length} items, $${total}`
'2 items, $160'
Apart from .reduce(), which dates from ES5, and long-standing basics such as new and array literals, every construct in the session arrived in ES2015. An engine that only implements ES5 rejects the first line with a SyntaxError before running anything. That gap is why transpilation was common until engines caught up.
Related Resources
Course
JavaScript Classes for Pythonistas
Port a swimming pool's booking module from Python to JavaScript, and learn constructors, fields, private state, static members, subclasses, and methods that keep their this.
For additional information on related topics, take a look at the following resources:
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Leodanis Pozo Ramos • Updated Nov. 23, 2026