Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ES6: Features By Testing

Kyle Simpson
September 18, 2015

ES6: Features By Testing

ES6 (aka ES2015) offers many new and exciting features, from expressive syntax, to new powerful built-in APIs, to entirely new-to-JS programming paradigms. We'll start by quickly reviewing some of the best of these coming attractions.

But how do we properly and responsibly bridge from our current code to the new ES6? Browser support in the newest browsers is already very strong, but has a long way to go, and older browsers still loom.

Let's look to feature testing to fully embrace everything JS has to offer our applications, not only now but beyond ES6!

Kyle Simpson

September 18, 2015
Tweet

More Decks by Kyle Simpson

Other Decks in Programming

Transcript

  1. Block-Scoped Declarations Spread / Rest Default Parameter Values Destructuring Object

    Literal Extensions Template Literals Arrow Functions `for..of` Loops Regular Expression Extensions Number Literal Extensions Unicode Symbols Iterators Generators Modules Classes
  2. Promises Generators + Promises Typed Arrays Maps WeakMaps Sets WeakSets

    `Array` `Object` `Math` `Number` `String` Function Names Meta Properties Well Known Symbols Proxies `Reflect` API Tail Call Optimization (TCO)
  3. arrow functions • will it ever need this/super? • will

    it ever need a lexical name? • will it ever need more than one statement? • will its return have side effects? • are all the syntax variances really readable/obvious? caveats
  4. Microsoft Edge 0.11.10074.0 Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36

    (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0
  5. transpiling & polyfilling: can't • several well-known symbols • subclassing

    natives • __proto__ • tail call optimization (rewriting to tail calls can) https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/ suggestions/6850816-es6-tail-call-optimization • others... caveats