Use Inheritance So You Don't Repeat Yourself help

Tell us what’s happening:

So I’m not sure what is the issue here? As far as I can see my code is correct?

Your code so far


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

Cat.prototype = {
  constructor: Cat, 
    console.log("nom nom nom");
  }
};

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

Bear.prototype = {
  constructor: Bear, 
    console.log("nom nom nom");
  }
};

function Animal() { }

Animal.prototype = {
  constructor: Animal,
  eat: function() {
    console.log("nom nom nom");
  }
};

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/use-inheritance-so-you-dont-repeat-yourself/

There are few syntax problems that’s all ^^
An object is composed of key-value pairs, you can’t put in there a wild console.log :stuck_out_tongue:

Cat.prototype = {
  constructor: Cat, 
    console.log("nom nom nom");
  }
};

Bear.prototype = {
  constructor: Bear, 
    console.log("nom nom nom");
  }
};

You should not console.log anything as it is not required by the challenge and also it has an extra " } " parenthesis. Both Cat and Bear prototypes.