es7 (2016) 简明汇总

1. 数组includes()方法,用来判断一个数组是否包含一个指定的值,根据情况,如果包含则返回true,否则返回false。

2. a ** b指数运算符,它与 Math.pow(a, b)相同

简析:

1. includes(), 即indexOf(x) > -1

list.includes(x)
// 等价于
list.indexOf(x) >= 0

2. **, 即Math.pow()

Math.pow(2, 10)
//等价于
2 ** 10
原文地址:https://www.cnblogs.com/xulei1992/p/15567835.html