Skip to content

Instantly share code, notes, and snippets.

@hachesilva
Created August 15, 2017 18:02
Show Gist options
  • Save hachesilva/93bf7967e36e6d53c902114a0252e41b to your computer and use it in GitHub Desktop.
Save hachesilva/93bf7967e36e6d53c902114a0252e41b to your computer and use it in GitHub Desktop.
// Expose module as global variable
var Module = function(){
// Inner logic
function sayHello(){
console.log('Hello');
}
// Expose API
return {
sayHello: sayHello
}
}
var module = new Module();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment