Skip to content

Instantly share code, notes, and snippets.

@jazahn
Created September 2, 2015 15:47
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 jazahn/66f14bc59ea35784d9cc to your computer and use it in GitHub Desktop.
Save jazahn/66f14bc59ea35784d9cc to your computer and use it in GitHub Desktop.
Module Pattern
ModuleName.methodName();
ModuleName.anotherMethodName();
var ModuleName = (function(){
var methodName = function(){
// do something...
};
var anotherMethodName = function(){
// do something else...
};
return {
methodName: methodName,
anotherMethodName: anotherMethodName
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment