Created
May 9, 2012 15:05
-
-
Save jackz3/2645236 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
var Module = (function() { | |
// 现在所有函数直接互访 | |
var privateFunc = function() { | |
publicFunc1(); | |
}; | |
var publicFunc1 = function() { | |
publicFunc2(); | |
}; | |
var publicFunc2 = function() { | |
privateFunc(); | |
}; | |
// 返回对象赋予Module | |
return { | |
publicFunc1: publicFunc1, | |
publicFunc2: publicFunc2 | |
}; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment