Object Using name of prototype function name instead of its property
<p>I created two function A and B. Made A as prototype of B. <a href="http://jsfiddle.net/WbZfz/" rel="nofollow">jsfiddle</a></p>

<pre><code>function A(){

}

function  B(){
    this.name ="Class B";
}

B.prototype = A;
var b = new B();
alert(b.name); // expected Class B got A
</code></pre>

<p>I know I should have used <code>B.prototype = new A();</code> </p>

<p>Is above behavior expected? 
Is it possible to get "Class B" instead of "A" in above scenario?</p>

<p><strong>Note:</strong> I am using above because A has some property associated with it as <code>A.text = "Text"</code> <code>A.text1 = "Text2"</code> and I want these property available to B. so <code>B.prototype == A.prototype.</code> can not be used.  </p>
