ES6 & ES7
Things TC39 focused on for ES6.
- Better abstraction capability
- Better functional programming support
- Better OO support
- Expressiveness and clarity
- Better compilation target
- Things that nobody else can do.
For the next iteration, ES7:
- new array function: [“a”, “b”].includes (“b”) // true
- exponentiation operator: 3 ** 2 //9, the exponentiation operator
Missed for this coming release (maybe the next?):
- async functions
- SIMD support
- String padStart padEnd
So, now that the standards are released, when do we get to play with the new features? Once the the browsers incorporate these changes into their next release. Some have already been incorporated, such as number and array functions in Firefox. Others like let will take a while. For now, you can use ES6 with a transpiler, which will take your code and compile it into ES5 for you. We personally use the sprockets-es6 gem for this task in Rails, but there are many others options including using Babel directly for Node.