Prototype inheritance. obj->C->B->A, but obj.constructor is A. Why?
<pre><code>var print = function(text){
  document.write(text);
  document.write("&lt;/br&gt;");
}

var A = function(){
}
A.prototype.name="A";

var B = function(){
}
B.prototype = new A();
B.prototype.name="B";

var C = function(){
}
C.prototype = new B();
C.prototype.name="C";

obj = new C();
print(obj.name);
print(obj.constructor.prototype.name);
print(obj.constructor == A);
</code></pre>

<p>This code gives next output:</p>

<pre><code>C
A
true
</code></pre>

<p>Why obj.constructor here is A and not C ?</p>
