JS的作用域和作用域链
摘要:
一:函数作用域 先看一小段代码:var scope="global";function t(){ console.log(scope); var scope="local" console.log(scope);}t();第一句输出的是: "undefined",而不是 "glob... 阅读全文
posted @ 2015-12-13 12:46 wjw413c 阅读(254) 评论(0) 推荐(0) 编辑
posted @ 2015-12-13 12:46 wjw413c 阅读(254) 评论(0) 推荐(0) 编辑