I have a base class:
function Monster() {
this.health = 100;
}
Monster.prototype.growl = function() {
console.log(\"Grr!\");
}
That
the absolutely minimal (and correct, unlike many of the answers above) version is:
function Monkey(param){
this.someProperty = param;
}
Monkey.prototype = Object.create(Monster.prototype);
Monkey.prototype.eatBanana = function(banana){ banana.eat() }
That's all. You can read here the longer explanation