Skip to content

Instantly share code, notes, and snippets.

@maximiliano
Created November 12, 2015 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximiliano/044dbf773c385fd38f39 to your computer and use it in GitHub Desktop.
Save maximiliano/044dbf773c385fd38f39 to your computer and use it in GitHub Desktop.
// first part
(function()
{
window.ext = {};
var MyClass = ext.MyClass = function() {
this.foo = 'bar';
};
MyClass.prototype = {
func1: function() {
...
},
func2: function() {
...
}
};
})();
// Second part
(function() {
ext.anObject = new ext.MyClass();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment