Tell us what’s happening:
Does not pass “Your code should show that Object.prototype is the prototype of Dog.prototype” test. Tried to add console.log, but it did not help.
Your code so far
function Dog(name) {
this.name = name;
}
let beagle = new Dog("Snoopy");
Dog.prototype.isPrototypeOf(beagle); // => true
// Fix the code below so that it evaluates to true
console.log(Object.isPrototypeOf(Dog.prototype));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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/understand-the-prototype-chain