JS: ECMAScript 2016

By Xah Lee. Date: . Last updated: .

Array.prototype.includes

Improved version of JS: Array.prototype.indexOf . Now can detect NaN and empty element in Sparse Array as undefined

The power operator 「**」

easier syntax for Math.pow(x, y)

console.log(3 ** 2 === 9);
// true

The power assignment operator 「**=」

let x = 3;
x **= 2;
console.log(x === 9);

JavaScript. ECMAScript New Features