Prototype Practice glitch or error?


#1

This is my code for Prototype Practice:

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
Cat.prototype.meow = function() {
console.log("Meow");
};

// add code here to make the cats meow!
cheshire.meow();
gary.meow();

It gives me the result that is:
Meow
Meow

But it also gives me this error:
Oops, try again. It looks like your meow method doesn't properly log to the console 'Meow!

I'm not sure why!


#2

an exclamation mark is missing at the end of your meow


#3

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