ECMAScript
Key new features
ES2015 (ES6)
let
and const
- Class syntax
- Method syntax in classes and object literals
- Arrow functions
- Template literals
- Destructuring
- Property value shorthands (object literal entries with same key/value)
- Rest and spread for arrays and arguments
- ES6 modules:
export
and import
Not much
async
/await
- Trailing commas in function parameter lists and calls
Object.entries()
- Object rest/spread
Promise.prototype.finally()
- Optional chaining:
?.
- Nullish coalescing operator:
??
- Logical assignment operators:
||=
&&=
??=
- Top-level
await
- (some of) private class fields and methods (instance and static)
Array.prototype.at
including negative indices
Array.findLast()
and .findLastIndex()
- Immutable array methods
.toReversed()
.toSorted()
.toSpliced()
.with()
(updates one entry)
Pre-Stage-4