Cisco Javascript Essentials 2 Answers Exclusive Page
Dog.prototype = Object.create(Animal.prototype); Dog.prototype.constructor = Dog;
Animal.prototype.sound = function() { console.log("The animal makes a sound."); }; cisco javascript essentials 2 answers exclusive
Dog.prototype.sound = function() { console.log("The dog barks."); }; Dog.prototype = Object.create(Animal.prototype)
function Dog(name) { Animal.call(this, name); } Dog.prototype.constructor = Dog