HN user

alexdf

2 karma
Posts1
Comments3
View on HN

>Cat.prototype = new Mammal()

This is only useful if Mamaml has only methods and no properties which does not happen that often.

> Cat.prototype.constructor = Cat

I never saw a practical usage of this one :-)

I think these days the standard way of doing inheritance should be -> MyClass.prototype = Object.create(baseClass.prototype)