Created
March 6, 2013 10:01
-
-
Save zacker330/5098228 to your computer and use it in GitHub Desktop.
about javascript's closure
This file contains hidden or 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
| var proApp = { | |
| inner : function(){ | |
| alert(proApp.defaultSettings.arg1); | |
| }, | |
| defaultSettings : { | |
| arg1 : 1, | |
| str : "string" | |
| } | |
| } | |
| proApp.inner(); | |
| // will alert 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment