坏小仔

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年9月17日

摘要: In JavaScript,scope iskept within functions, but not within blocks (such as while, if, and for statements).// Set a global variable, foo, equal to testvar foo = "test";// Within an if blockif ( true ) {// Set foo equal to 'new test'// NOTE: This is still within the global scope!var 阅读全文
posted @ 2012-09-17 10:40 坏小仔 阅读(106) 评论(0) 推荐(0) 编辑