-
-
Save donthorp/373911 to your computer and use it in GitHub Desktop.
Kevin's Module Pattern for JS
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 myApplication = function(){ | |
var name = 'Chris'; | |
var age = '34'; | |
var status = 'single'; | |
function createMember(){ | |
// [...] | |
} | |
function getMemberDetails(){ | |
// [...] | |
} | |
return{ | |
create:createMember, | |
get:getMemberDetails | |
} | |
}(); | |
//myApplication.get() and myApplication.create() now work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment