Created
May 9, 2012 14:46
-
-
Save jackz3/2645022 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable1 = 1; //全局范围 | |
var variable2 = 2; // 不在一个函数内: 全局范围 | |
function funcName() { | |
variable3 = 3; // 没用var关键字声明: 全局范围 | |
var variable4 = 4; //仅本地访问 | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment