Skip to content

ECMAScript support cheatsheet

LA-MJ edited this page May 1, 2016 · 2 revisions

Based on Mozilla's support

Assuming Chrome 39+, Firefox 38+, Safari 7.1+

Can be used now:

  • const
  • getters & setters
  • { ['foo']: 'bar' }
  • for .. of ..
  • Object.getPrototypeOf()
  • TypedArrays
  • Array.prototype: indexOf(), lastIndef(), entries(), keys(), forEach(), every(), some()
  • Math: log10(), log2(), log1p(), expm1(), cosh(), sinh(), tanh(), acosh(), asinh(), atanh(), hypot(), trunc(), cbrt(), imul(), fround()
  • Promise: all(), race(), reject(), resolve()
  • Map, Set, WeakMap

Except in Safari:

  • { a, b, c }
  • generators
  • Map(iterable)
  • Object.setPrototypeOf()
  • Math: sign(), clz32()

Waiting catch up to Firefox

Safari 9

  • String.raw
  • 0b0, 0o0
  • Object.asign()
  • Array.from()
  • String.prototype: startsWith(), endsWith(), includes(), repeat()
  • Number.isNaN() (strict NaN)
  • WeakSet

Chrome 41

  • String.raw
  • 0b0, 0o0
  • String.prototype: startsWith(), endsWith(), includes(), repeat()

Chrome 42

  • { method(){} }

Chrome 44

  • Unicode codepoints & \u{}

Chrome 45

  • () => {}
  • Object.asign()
  • Array: from(), of()
  • Array.prototype: fill()[1], find()[1], findIndex()

Chrome 46

  • Spread operator [2]

Chrome 47

  • Rest params

Chrome 49

  • Default params [2]
  • Destructuring

  • [1] Supported in SF7 o.0
  • [2] Not with destructuring 👎