ECMAScript 7 / ES2016
Important note
Official ECMAScript 2016 specification only introduces method Array.prototype.includes
and **
exponentiation operator.
Async functions, decorators, observables, etc. will be specified in next specifications, but for now you can use them using some preprocessing tools, like Babel or even TypeScript.
ES7/2016 official features
Array.prototype.includes
> ['a', 'b', 'c'].includes('a')
true
> ['a', 'b', 'c'].includes('d')
false
Exponentiation operator **
let squared = 3 ** 2; // 9
let num = 3;
num **= 2;
console.log(num); // 9
Useful links
- New features in ES7+ and how we can use them in React
- JavaScript goes to Asynchronous city -
async await
- ES7+ Decorators
- ES Observables Proposal for ECMAScript! -
Observable
- Exploring ES2016 and ES2017 ebook