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:
- Default parameters
- Template literals
- Multiline strings
- Destructuring assignment
- Enhanced object literals
- Arrow functions
- Promises
- Block-scoped constructs: let and const
- Classes
- 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.
Remember when we had to use statements like these to define default parameters?
Print-ready PDF available
In addition to this essay, I’ve created a free beautifully designed, print-ready ES6/ES2015 cheatsheet. You can request this PDF at http://reactquickly.co/resources.

This approach was fine until the value wasn’t 0. When you have 0, there may be a bug. A 0 value defaults to the hardcoded value instead of becoming the value itself, because 0 is falsy in JavaScript. Of course, who needs 0 as a value (#sarcasmfont)? So we ignored this flaw and used the logical OR. No more! In ES6, you can put the default value right in the signature of the function: