Tell us what’s happening:
Hi, I don’t understand why I am getting errors when running my code. This code is, however, the correct code. I only see 3 dots under the letter ‘B’ (from ‘Bird’) → see screenshot. Am I doing something wrong in the freeCodeCamp editor?
Your code so far
function Animal() { }
function Bird() { }
function Dog() { }
Bird.prototype = Object.create(Animal.prototype);
Dog.prototype = Object.create(Animal.prototype);
// Only change code below this line
Bird.prototype.constructor = Bird;
Dog.prototpye.constructor = Dog;
let duck = new Bird();
let beagle = new Dog();
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Object Oriented Programming - Reset an Inherited Constructor Property
Link to the challenge: