B.prototype.inheritFrom(A) not standard JavaScript, while B.prototype = new A is standard JavaScript. I suggest exploring all aspects of JavaScript and embracing the prototype. You better know that. It really is not too complicated:
function A(){} function B(){} B.prototype = new A; b = new B; console.log(b instanceof B, b instanceof A);
kzh source share