This is an example of how I like to create JavaScript classes.  It is simply the technique I have developed over time and is supported by the ECMAScript library.  Here I create a three-tier class hierarchy and show the correct output for invoking a single overridden method and that all the instanceof tests pass.

Source

  var out = js.dom.getElement('out');
  var inst = new js.example.Homonid();

  js.dom.removeChildren(out);
  out.appendChild(js.dom.createElement('p=' + inst.about()));

  if (inst instanceof js.example.Homonid) {
    out.appendChild(js.dom.createElement('blockquote=instanceof Homonid'));
  }

  if (inst instanceof js.example.Primate) {
    out.appendChild(js.dom.createElement('blockquote=instanceof Prmate'));
  }

  if (inst instanceof js.example.Mammal) {
    out.appendChild(js.dom.createElement('blockquote=instanceof Mammal'));
  }

Output

Classes

ECMAScript.Extend('example', function (ecma) {

  var proto = {};

  this.Mammal = function () {
    this.level = 1;
  };

  this.Mammal.prototype = proto;

  proto.about = function () {
    return this.level + ": mammal";
  };

});

ECMAScript.Extend('example', function (ecma) {

  var CMammal = ecma.example.Mammal;

  var proto = ecma.lang.createMethods(CMammal);

  this.Primate = function () {
    CMammal.apply(this, arguments);
    this.level = 2;
  };

  this.Primate.prototype = proto;

  proto.about = function () {
    return CMammal.prototype.about.call(this) + ", " + "primate";
  };

});

ECMAScript.Extend('example', function (ecma) {

  var CPrimate = ecma.example.Primate;

  var proto = ecma.lang.createMethods(CPrimate);

  this.Homonid = function () {
    CPrimate.apply(this, arguments);
    this.level = 3;
  };

  this.Homonid.prototype = proto;

  proto.about = function () {
    return CPrimate.prototype.about.call(this) + ", " + "homonid";
  };

});