Skip to content

Instantly share code, notes, and snippets.

@markdaws
Created February 7, 2012 09:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save markdaws/1758439 to your computer and use it in GitHub Desktop.
Save markdaws/1758439 to your computer and use it in GitHub Desktop.
(function(window) {
var common = window.common = {};
common.foo = function() {
return 'bar';
};
})(window);
// Elsewhere in the code you can now say window.common.foo();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment