这本书比阮一峰老师那本《ES6入门》更深入,翻译质量也挺好的,值得一读。 翻译版权归译者。 Exploring JS: Javascr ipt books for programmers Most of the following books are free to read online. I hope you’ll like them so much that you’ll buy the offline versions. — Dr. Axel Rauschmayer (author o
ECMA标准issues were filed representing thousands of bug fixes, editorial fixes and other improvements. Additionally, numerous
software tools were developed to aid in this effort including ecmarkup, Ecmarkdown, and Grammarkdown ES2016 also
included supp
本文实例讲述了es6函数之严格模式用法。分享给大家供大家参考,具体如下:
从es5开始,函数内部可以设定为严格模式。
function doSomething(a, b) {
'use strict'
// code
}
es2016做了一点修改,规定只要函数参数使用了默认值,解构赋值,或者扩展运算符,那么函数内部就不能显示设定为严格模式,否则会报错。
// 报错
function doSomething(a, b = a) {
'use strict'
// code
}
con