Remember to Set the Constructor Property when Changing the Prototype(dog)

Tell us what’s happening:
Describe your issue in detail here.
I’m having issues defining the constructor property on the Dog prototype

  **Your code so far**

Dog.prototype = {
constructor: dog,
numLegs: 2,
eat: function() {
  console.log("nom nom nom");
},
describe: function() {
  console.log("My name is " + this.name);
}
};

  **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: Remember to Set the Constructor Property when Changing the Prototype

Link to the challenge:

Just a minor typo here. Dog is not the same as dog.

1 Like

It didn’t help. Thanks

Did you delete this from the top?:

 function Dog(name) {
   this.name = name;
}

copy pasting your code with dog changed to Dog works for me.

1 Like

Oh Sorry, Yes, I did but thanks

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