报错集1: 使用 let 声明变量报错
使用 let 声明变量报错, 报错信息SyntaxError: Block-scoped declarations (let, const, function, class) not yet sup ported outside strict mode一. 原因分析let, const 都是 ES6 才支持的浏览器版本过低, 不能识别该变量声明 (浏览器版本为: Chrome 48.0.2564.116)二. 解决方法在 js 文件的最前添加 "use strict" , 即在严格模式下执
原创
2020-07-23 22:24:13 ·
1157 阅读 ·
0 评论