Skip to content

Instantly share code, notes, and snippets.

@vanderlin
Last active August 29, 2015 13:56
Show Gist options
  • Save vanderlin/9147580 to your computer and use it in GitHub Desktop.
Save vanderlin/9147580 to your computer and use it in GitHub Desktop.
var GlobalClass = (function () {
var propA = 33;
var name = "Something";
var callback;
return {
value:33,
stringvar:"some string",
sayThis: function(e) {
callback = e;
console.log(e);
if(typeof(e) == "function") {
e();
}
},
myFunction: function() {
console.log(name);
}
}
})();
// now
GlobalClass.myFunction();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment