What's wrong with this code?


#1



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


#2

seems ok, what is the error?

try adding a TAB before "console.log("Meow!");


#3

It's a typo in Cat.protoype.meow=function(){. You are missing t in .protoype. I've done the same a few times....


#4

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