Skip to content

Instantly share code, notes, and snippets.

@JustinChristensen
Created November 6, 2012 04:50
Show Gist options
  • Save JustinChristensen/4022648 to your computer and use it in GitHub Desktop.
Save JustinChristensen/4022648 to your computer and use it in GitHub Desktop.
(function (window, $, undefined) {
var myGlobal;
var module = {
moduleMethod1: function () {
myGlobal = 42;
},
moduleMethod2: function () {
console.log(myGlobal);
}
}
module.moduleMethod1();
module.moduleMethod2();
}(window, jQuery));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment