Over recent times, Promises have risen to the top of the design pattern food chain with many developers utilizing libraries like Q, When, RSVP, and other Promise implementations. Ridding us of nested callback hell, Promises allow us to write readable asynchronous code that’s easy to work with. With ES2015, promises are baked in, including all the features we’ve grown to love in the earlier implementations. If you are new to Promises, now is the time to get involved.
4. Arrow Functions
5. Block Scoping
6. Template Strings
10. String / Math Functions
We are also gifted a number of simple, yet super useful String and Math methods that make working with strings and numbers easier than before. I know, not hard right?!. String offerings like includes(), startsWith(), endsWith(), and repeats() means less hacks for us all. There’s a lot more fun to be had with numbers too, including specifying integers in binary and octal notation as well as several new methods for us to play with including sign(), trunc() and cbrt().
ES2015 brings a wealth of new features to our favorite and often strange little language. Every time you use a new feature instead of that same old ugly hack you get a feeling of joy that only technologists can understand. There is so much more than we have covered here so dive in and see how the language has grown up and transformed.
Here's to the future…