15/30 Prototype practice



I dont think I'm missing anything.
The error is:Oops, try again. There was a problem with your syntax.

Replace this line with your code. 
function Cat(name, breed) {
    this.name = name;
    this.breed = breed;

// let's make some cats!
var cheshire = new Cat("Cheshire Cat", "British Shorthair");
var gary = new Cat("Gary", "Domestic Shorthair");

// add a method "meow" to the Cat class that will allow
// all cats to print "Meow!" to the console
var Cat.prototype.meow = function() {

// add code here to make the cats meow!


You don't need a var call for your Cat.prototype.meow = function() {.


Thanks for your prompt reply!:slight_smile:


Wait but now it says "Oops, try again. It looks like you have an error in your code. Here's the message: ReferenceError: chesire is not defined" when i delete var.


Make sure you spell cheshire correct. Check your second last line of your code.


oh i spelled cheshire wrong thanks for your help!


Haha no problem! Have a nice day :slight_smile:


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