We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有一些JavaScript的写法必须要规避。 开发尽量使用严格模式。IE10 以下不支持严格模式
"use strict";
两个 name 会被提升到 作用域的最前面 ,在严格模式下, 重复定义一个变量名会报错。
SCRIPT1046:严格模式下不允许一个属性有多个定义
var testObj = { prop1: 10, prop2: 15, prop1: 20 };
这里有两个 prop1 属性, 在严格模式下报错
The text was updated successfully, but these errors were encountered:
No branches or pull requests
JS规范
SCRIPT1046:严格模式下不允许一个属性有多个定义

这里有两个 prop1 属性, 在严格模式下报错
参考
The text was updated successfully, but these errors were encountered: