Created
March 29, 2010 18:53
-
-
Save swalke16/348242 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 bar() | |
{ | |
} | |
bar.prototype.foo = function() {}; | |
var x = new bar(); | |
x.constructor ==> bar() // this seems correct | |
// doing obj.prototype = {} seems to hose the constructor property | |
function foo(options) | |
{ | |
} | |
foo.prototype = { | |
bar: function() {} | |
} | |
var x = new foo(); | |
x.constructor ==> Object() // Shouldn't this be equal to foo(options)??? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment