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

ES2016

Not much

ES2017

  • async/await
  • Trailing commas in function parameter lists and calls
  • Object.entries()

ES2018

  • Object rest/spread
  • Promise.prototype.finally()

ES2019

  • Object.fromEntries()

ES2020

  • Optional chaining: ?.
  • Nullish coalescing operator: ??

ES2021

  • Logical assignment operators: ||= &&= ??=

ES2022

  • Top-level await
  • (some of) private class fields and methods (instance and static)
  • Array.prototype.at including negative indices

ES2023

  • Array.findLast() and .findLastIndex()
  • Immutable array methods
    • .toReversed()
    • .toSorted()
    • .toSpliced()
    • .with() (updates one entry)

Pre-Stage-4