Stuck on 15


#1

function Cat(breed, meow) {
this.breed = breed;
this.meow = meow;
}

// 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();

idk what the problem is
please help


#2

function Cat(name, breed) {
this.name = name;
this.breed = breed;
this.meow = function(){
console.log("Meow!!");
};
}

// 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

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

new code
whats the problem


#3

your Meow has two exclamation marks, this should be one.

Also, this is prototype practice, shouldn't you use prototype?


#4

Idk What a Prototype is i dont understand


#5

protottype allows you to add methods after the object, this method is added to already existing instances of your object. See previous exercise


#6

Thanks alot man thanks


#7