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

ES6 Features

ES6 Features

For ForwardJS 2015.

Brian Holt

July 30, 2015
Tweet

More Decks by Brian Holt

Other Decks in Programming

Transcript

  1. E S 6 F E AT U R E S

    B R I A N H O LT House of Cards
  2. E S 6 C O N V E N I

    E N C E S • Enhanced object literal syntax • Default params • Template strings • const and let • codepen.io/btholt/pen/mJQWjQ Better Call Saul
  3. E S 6 C O N V E N I

    E N C E S • Destructuring • Spread / rest operator • For … of loops • codepen.io/btholt/pen/eNQvov Hemlock Grove
  4. A R R O W F U N C T

    I O N S • From CoffeeScript • Shorthand for function • Autobinds to lexical scope • codepen.io/btholt/pen/RPqKxp Daredevil
  5. C L A S S E S • Syntactical sugar!

    • Looks like classical inheritance, but not. • Useful for the new version of ES6 • codepen.io/btholt/pen/QbJveO BoJack Horseman
  6. P R O M I S E S • Finally

    built straight into JS • Easier way of dealing with callbacks • Work well with AJAX • codepen.io/btholt/pen/gpQRRW Wet Hot American Summer: First Day of Camp
  7. G E N E R AT O R S •

    New construct to ES6 that enablew new patterns of asynchronous programming that looks synchronous. • Can greatly reduce the complexity of some problems. • Can be confusing due to their versatility in how they handle input and output. • github.com/btholt/generator-examples • speakerdeck.com/btholt/unlimited-power-es6-generators Bloodline
  8. O T H E R E S 6 F E

    AT U R E S • Better Unicode support • Modules • Maps / sets • New object and Math APIs Unbreakable Kimmy Schmidt
  9. O T H E R E S 6 F E

    AT U R E S • Proxies • Symbols • Weak maps / weak sets • Tail call recursion Arrested Development