Tell us what’s happening:
Describe your issue in detail here.
Your code so far
function Animal() { }
Animal.prototype.eat = function() { console.log("nom nom nom"); };
function Dog() { }
// Only change code below this line
Dog.prototype = Object.create(Animal.prototype);
Dog.prototype.constructor = Dog;
Dog.prototype.bark = function(){
console.log("woof!");
};
// Only change code above this line
let beagle = new Dog();
Your browser information:
User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Mobile/15E148 Safari/604.1
Challenge: Add Methods After Inheritance
Link to the challenge: