为什么在用JavaScript定义函数之前我可以使用它?
function fooCheck() { alert(internalFoo()); // We are using internalFoo() here... return internalFoo(); // And here, even though it has not been defined... function internalFoo() { return true; } //...until here!}fooCheck();
catspeake
摇曳的蔷薇
慕侠2389804
相关分类