function f() {
var b = "b";
return function() {
alert(b);
return b;
};
}
var a = function f();
alert(a);
我尝试运行此代码,但出现我不理解的错误。
Error:
Problem at line 8 character 21: Expected '{' and instead saw ';'.
var a = function f();
Problem at line 8 character 21: Unnecessary semicolon.
var a = function f();
Problem at line 8 character 22: Missing semicolon.
var a = function f();
Implied global: alert 4,9
这段代码有什么问题我想从全局范围内提醒privete var。我应该改变什么?很多谢谢。</p>