how can i call a super constructor from an inheriting object? For example, I have a simple animal class:
function Animal(legs) { this.legs = legs; }
I want to create a "Chimera" class that inherits Animal, but sets the number of legs to a random number (providing the maximum number of legs in the constructor. So far I have this:
function Chimera(maxLegs) {
How to call the constructor Animal? thanks
source share