I know that I could do a simple prototypal inheritance in JavaScript like this:
var Parent = function() {
};
var Child = function() {
}
Child.prototype = new Parent();
Child.prototype.constructor = Child;
However, I’m curious to how one would accomplish deeper inheritances? What about multi-inheritance, is that possible?
You can’t do multiple inheritance in JavaScript. You can do deeper inheritance by simply going further:
And to show it works: