Created
July 16, 2009 11:57
-
-
Save dragon3/148377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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