Skip to content

Instantly share code, notes, and snippets.

@donthorp
Forked from kwhinnery/gist:372692
Created April 21, 2010 14:55
Show Gist options
  • Save donthorp/373911 to your computer and use it in GitHub Desktop.
Save donthorp/373911 to your computer and use it in GitHub Desktop.
Kevin's Module Pattern for JS
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