Variables, Scope, and Memory(Chapter 4 of Professional JavaScript® for Web Developers 2nd Edition)
摘要:
JavaScript ’ s lack of block - level scopes is a common source of confusion.[代码] When a variable is declared using var , it is automatically added to the most immediate contextavailable. In a function, the most immediate one is the function ’ s local context; in a with statement, themost immediate 阅读全文
posted @ 2011-01-10 19:55 Ray Z 阅读(182) 评论(0) 推荐(0) 编辑