-
-
Save webdesignberlin/9262779 to your computer and use it in GitHub Desktop.
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 myNamespace = myNamespace || {}; | |
myNamespace.myFancyModule = (function() { | |
var self = {}, | |
_ = {}; | |
_.concatString = function(str) { | |
return 'Hello ' + str; | |
}; | |
self.init = function(name) { | |
alert(_.concatString(name)); | |
}; | |
return self; | |
})(); | |
$(function() { | |
myNamespace.myFancyModule.init('Module Pattern'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment