Last active
May 20, 2016 11:03
-
-
Save robert52/de4f091a5d87d266657babae8d004af5 to your computer and use it in GitHub Desktop.
Simple JavaScript 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
var DashboardModule = (function () { | |
var privateVar = 'this is private var'; | |
return { | |
init: function () { | |
// some init functionalities | |
}, | |
bindHandlers: function () { | |
// bind jquery/event handlers | |
}, | |
modifyPrivateVar: function(value) { | |
privateVar = value; | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment