jjzjj

innerFunction

全部标签

javascript - 如果存在同名的局部变量,如何访问闭包中的变量?

我从GoogleCodePlayground中获取了这个http://code.google.com/apis/ajax/playground//*CLOSURE*Whenafunctionisdefinedinanotherfunctionandit*hasaccesstotheouterfunction'scontextevenafter*theouterfunctionreturns*AnimportantconcepttolearninJavascript*/functionouterFunction(someNum){varsomeString='Hai!';varconte