Created
September 2, 2015 15:47
-
-
Save jazahn/66f14bc59ea35784d9cc to your computer and use it in GitHub Desktop.
Module Pattern
This file contains 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
ModuleName.methodName(); | |
ModuleName.anotherMethodName(); |
This file contains 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 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