Skip to content

Instantly share code, notes, and snippets.

@dragon3
Created July 16, 2009 11:57
Show Gist options
  • Save dragon3/148377 to your computer and use it in GitHub Desktop.
Save dragon3/148377 to your computer and use it in GitHub Desktop.
function Deferred() { console.log(this); return (this instanceof Deferred) ? this.init() : new Deferred() }
Deferred.prototype = {
init: function() { console.log("init"); }
};
new Deferred();
Deferred();
//Object
//init
//Window code.101000lab.org
//Object
//init
//Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment