the javascript object model: strange constructor property
<p>I find the behaviour of this piece of code puzzling, why is the constructor of <code>child</code> not <code>Child</code>? Can someone please explain this to me?</p>

<pre><code>function Parent() {
    this.prop1 = "value1";
    this.prop2 = "value2";
}

function Child() {
    this.prop1 = "value1b";
    this.prop3 = "value3";
}
Child.prototype = new Parent();

var child = new Child();

// this is expected
console.log(child instanceof Child); //true
console.log(child instanceof Parent); //true

// what??
console.log(child.constructor == Child); //false
console.log(child.constructor == Parent); //true
</code></pre>
