Skip to content

Instantly share code, notes, and snippets.

@samoshkin
Last active August 16, 2019 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samoshkin/cf5565ca98cce8f2d09ba9571612758b to your computer and use it in GitHub Desktop.
Save samoshkin/cf5565ca98cce8f2d09ba9571612758b to your computer and use it in GitHub Desktop.

ES5, released on 2009
ES6, released on 2015 (very large scope of features)
Each next version is released once a year, and would include much less features.

ECMAScript 6 compatibility table - https://kangax.github.io/compat-table/es6/
ECMAScript 2016+ compatibility table - https://kangax.github.io/compat-table/es2016plus/

ES6 (ES 2015) features

  • Block scoping with let and const
  • Block-level functions
  • Template strings
  • Unicode support
  • Function default parameters
  • Rest parameters and spread operator
  • Arrow functions with "this" being statically bound
  • Tail call optimization
  • Destructuring (inverse of construction)
  • Classes, subclassable built-ins
  • Iterators and generators
  • Enhanced object literals
  • Typed arrays
  • Symbols
  • Map and Set (weakmap and weakset)
  • Promises
  • Built-in types API additions
  • binary and octal literals
  • Proxies and reflection api

ES 2016-2017 features

Exploring ES2016 and ES2017 - https://exploringjs.com/es2016-es2017/index.html

  • API enchancements: Array.prototype.include(), Object.getOwnPropertyDescriptors(), String.prototype.padEnd/padStart() (Node 8+)
  • exponentiation operator: number ** pow
  • async/await functions (Node 8+, Edge)
  • trailing commas in function calls and signatures are lega (Node 8+, Edge)

ES 2018-2019 features

Exploring ES2018 and ES2019 - https://exploringjs.com/es2018-es2019/toc.html

  • async iterators and generators (Node 10+, not supported in Edge)
  • object rest/spread properties (Node 8+, not supported in Edge)
  • "s" (dotAll) flag for regular expressions (Node 8+ Not supported in Edge, Firefox, TypeScript compiler.)
  • Promise.prototype.finally (Node 10+, Edge 18+)
  • Array.prototype.flat(), Array.prototype.flatMap() methods (Node 12+, TypeScript. Not supported by by Firefox, Edge, Babel compiler)
  • Object.fromEntries() (Node 12+, TypeScript. Not supported: Babel, Edge, Firefox).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment