ES 2016

Also known as ECMAScript 2016 or ES7


Array.prototype

Before

let chars = ['a','b','c','d']  
if (chars.indexOf('b') !== -1) {}

Now

if (chars.includes('b') ) {}  
 //returns the correct value when searching for NaN

Exponentiation Operator

The exponentiation operator (**) raises the first operand to the power of the second operand.

let base = 3 
let exponent = 4
let result = base ** exponent



© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext