Skip to content

Instantly share code, notes, and snippets.

@mparke
Created May 31, 2013 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mparke/5685340 to your computer and use it in GitHub Desktop.
Save mparke/5685340 to your computer and use it in GitHub Desktop.
Revealing Module Pattern
var module = (function(){
var privateNum = 10;
function privateFn(){
return privateNum * 2;
}
function publicFn(){
return privateFn();
}
return {
publicFn: publicFn
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment