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
//ie8使用的5.8版本--混淆了命名函数表达式 //[函数表达式标识符渗透到作用域中(enclosing) //命名函数表达式标识符在某外部作用域中是无效的。---Jscript明显违反该规定。下面的g被解析为函数对象。这样标识符就可能不经意的污染某个外部作用域--甚至是全局作用域。
g
var f = function g() {}; typeof g; // "function"
//将命名函数表达式同时当作函数声明和表达式 //<--函数声明优先于任何表达式被解析-->
typeof g; // function var f = function g(){}; //Jscript实际上是把函数表达式当作函数声明了。 //命名函数创建两个不同对象 var f = function g(){}; f === g
f.expando = 'foo'; g.expandol // undefined
The text was updated successfully, but these errors were encountered:
No branches or pull requests
//ie8使用的5.8版本--混淆了命名函数表达式
//[函数表达式标识符渗透到作用域中(enclosing)
//命名函数表达式标识符在某外部作用域中是无效的。---Jscript明显违反该规定。下面的
g
被解析为函数对象。这样标识符就可能不经意的污染某个外部作用域--甚至是全局作用域。//将命名函数表达式同时当作函数声明和表达式
//<--函数声明优先于任何表达式被解析-->
f.expando = 'foo';
g.expandol // undefined
The text was updated successfully, but these errors were encountered: