Skip to content

Instantly share code, notes, and snippets.

@MiguelCastillo
Last active August 29, 2015 13:59
Show Gist options
  • Save MiguelCastillo/10654916 to your computer and use it in GitHub Desktop.
Save MiguelCastillo/10654916 to your computer and use it in GitHub Desktop.
Modular design pattern
var Module = (function() {
var message = "Hello World"
function greetings() {
return console.log(message);
}
return {
greetings: greetings
};
})();
Module.greetings();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment