ES7又称ES2016,它只添加了两个小特性来说明标准化过程: 1. Array.prototype.includes() includes()用来判断一个数组是否包含一个指定值,如果包含则返回true,否则返回false 下面两个表达式是等价的: 1 2 arr.includes(x) arr.indexOf(x) >= 0 2. 指数操作符 在ES7中引入了指数操作符**,该操作符与Math.pow(..)具有等效的计算结果。 1 console.log(2**10); // 1024 Continue reading