Tell us what’s happening:
// running test
Cannot read property ‘constructor’ of undefined
Cannot read property ‘constructor’ of undefined
Cannot read property ‘constructor’ of undefined
Cannot read property ‘constructor’ of undefined
// tests completed
Your code so far
function Animal() { }
function Bird() { }
function Dog() { }
Bird.prototype = Object.create(Animal.prototype);
Dog.prototype = Object.create(Animal.prototype);
// Add your code below this line
beagle.constructor
let duck = new Bird();
duck.constructor // function Bird(){...}
let beagle = new Dog();
beagle.constructor // function Bird(){...}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property