Prototype chain Challenge

I’m finding it hard to understand the challenge and couldn’t get the result. Even, after checking the get-a-hint section the solution doesn’t seem to work. I’d love to get assisted by fellow developers by getting this explained, properly, and giving the necessary hint towards going pass this challenge.

  **Your code so far**

function Dog(name) { = name;

let beagle = new Dog("Snoopy");

Dog.prototype.isPrototypeOf(beagle);  // yields true

// Fix the code below so that it evaluates to true

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Challenge: Understand the Prototype Chain

Link to the challenge:

Finally understood. The mistake I made was that I didnt include prototype when i typed ‘Object’. It ought to be ‘Object.prototype’.

I finally got to understand it from the MDN website that Object.prototype is the prototype of all objects.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.