title: Get name of derived constructor in Javascript
body: <p>Is it possible to get the name of the derived "class" in the following example?  I'd like to somehow have the output be "ChildClass", but instead it's "ParentClass".</p>
  
  <pre><code>function ParentClass() { this.name = 'Bob' }
  function ChildClass() { this.name = 'Fred' }
  ChildClass.prototype = Object.create(ParentClass.prototype);
  
  var child_instance = new ChildClass()
  console.log('ChildClass type:', child_instance.constructor.name)
  </code></pre>
  
  <p>I realize I can do <code>this.my_type = 'ChildClass'</code> in the ChildClass constructor, but I have many classes that extend ParentClass and doing this everywhere would be inconvenient.</p>