Polymorphic constructor.name property access
<p>Given the JavaScript code:</p>

<pre><code>function Parent() { ... }
function Child() { ... }

Child.prototype = new Parent();

// toString implementation on the parent object
Parent.prototype.toString = function() {
  return this.constructor.name;
}

// And the code:
alert(new Child());
</code></pre>

<p>... will output "Parent" when the wanted outcome is to get the "Child" string back (the <code>constructor.name</code> inside the parent <code>toString</code> implementation should return the child constructor name).</p>

<p>Is this possible in JavaScript?</p>
