Skip to content

Instantly share code, notes, and snippets.

@bcherry
Created February 18, 2010 20:00
Show Gist options
  • Save bcherry/307989 to your computer and use it in GitHub Desktop.
Save bcherry/307989 to your computer and use it in GitHub Desktop.
var MYGLOBAL = (function () {
var that = {},
privateVariable = 2;
function privateFunction() {
//...
}
that.publicFunction = function () {
//
};
that.publicProperty = 1;
return that;
}());
MYGLOBAL.publicFunction();
MYGLOBAL.publicProperty = 10;
// etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment