摘要:
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
坏小仔
阅读(109)
评论(0)
推荐(0)