第一个是includes判断数组中的元素是否存在
let arr = ['hello', 'world']
console.log(arr.includes('hello')) // true
console.log(arr.includes('helle')) // false
第二个是指数运算。ES7进行了简写
ES5中的做法
Math.pow(2, 2) // 4
ES7中的做法
2 ** 2 // 4
第一个是includes判断数组中的元素是否存在
let arr = ['hello', 'world']
console.log(arr.includes('hello')) // true
console.log(arr.includes('helle')) // false
第二个是指数运算。ES7进行了简写
ES5中的做法
Math.pow(2, 2) // 4
ES7中的做法
2 ** 2 // 4