摘要: 今天备忘的是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() 阅读全文
posted @ 2013-01-03 10:36 Key_Ky 阅读(146) 评论(0) 推荐(0) 编辑