Appendix E. ES6 for success

This appendix provides a quick introduction to ES6. It describes the 10 best features of the new generation of the most popular programming language—JavaScript:

  1. Default parameters
  2. Template literals
  3. Multiline strings
  4. Destructuring assignment
  5. Enhanced object literals
  6. Arrow functions
  7. Promises
  8. Block-scoped constructs: let and const
  9. Classes
  10. Modules
Note

This list if highly subjective. It’s in no way intended to diminish the usefulness of other ES6 features that didn’t make it on the list only because I wanted to limit the number to 10.

Default parameters

Remember when we had to use statements like these to define default parameters?

var link = function (height, color, url) { var height ...

Get React Quickly: Painless web apps with React, JSX, Redux, and GraphQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.