Prototype Pratice


#1

Why am i getting this error (SyntaxError: Unexpected end of input)... what is wrong with my code? Please help!

function Cat(name, breed) {
this.name = name;
this.breed = breed;
Cat.prototype.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();


#2

this line:

function Cat(name, breed) {

the { doesn't have a matching closing curly bracket (})


#3

OMG! thank you dude!!