ES7 只由两个特性组成吗?
Is ES7 only composed of two features?
根据此博客:https://webapplog.com/es7-es8/
ES7 的特点是:
- Array.prototype.includes
- 求幂运算符
这样对吗?如果是,为什么只花了一年时间才对标准进行两个小改动(Array.prototype.includes
只是 indexOf !== -1
的别名)?
Yes,这些是当时准备好的新功能。
当然,也有 lots of editorial changes 修复了次要规范问题。
请注意,我们应该使用术语 ES2016 来指代该版本及其 relatively low significance. "ES7" was at the time (between the releases of ES2015 and ES2016) often misused as a synonym of ES.next,而不是 ES7(ECMAScript 7. 版本),其中包括在更高版本中出现的功能以及从未出现的功能是任何规范的一部分。
根据此博客:https://webapplog.com/es7-es8/
ES7 的特点是:
- Array.prototype.includes
- 求幂运算符
这样对吗?如果是,为什么只花了一年时间才对标准进行两个小改动(Array.prototype.includes
只是 indexOf !== -1
的别名)?
Yes,这些是当时准备好的新功能。
当然,也有 lots of editorial changes 修复了次要规范问题。
请注意,我们应该使用术语 ES2016 来指代该版本及其 relatively low significance. "ES7" was at the time (between the releases of ES2015 and ES2016) often misused as a synonym of ES.next,而不是 ES7(ECMAScript 7. 版本),其中包括在更高版本中出现的功能以及从未出现的功能是任何规范的一部分。