摘要:
今天备忘的是Variable Declaration and Variable Scope。今天直接上原汁原味的代码例子反而觉得更清楚:var scope = "global"; // Declare a global variablefunction checkscope() {var scope = "local"; // Declare a local variable with the same namereturn scope; // Return the local value, not the global one}checkscope() 阅读全文