JS support of ES7

1. the exponential operator (power): **

2.Array.prototype.includes (value): determining whether the array contains the specified value

1 console.log(2**4); //16
2 
3 let arr = [2,3,4,5,7,8];
4 console.log(arr.includes(1)); //false
5 console.log(arr.includes(3)); //true

 

Guess you like

Origin www.cnblogs.com/zhihaospace/p/12071879.html