Created
June 7, 2013 06:15
-
-
Save haoch/5727357 to your computer and use it in GitHub Desktop.
refer to arborjs.org: javascript object 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
(function(){ | |
// TODO evironment logic | |
OBJECT_NAME=function(){ | |
var that = { | |
init:function(){ | |
that.func_name() | |
return that | |
}, | |
func_name:function(){ | |
// do func1 | |
} | |
} | |
return that.init() | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment