15.Prototype practice


#1

Hello, I wrote this code, but I get an error: SyntaxError: Unexpected token {. Maybe you could help me to find what's wrong?

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 = fucntion () { 
    console.log("Meow!");
};

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


#2

this line:

Cat.prototype.meow = fucntion ()

you misspelled function, to be sure i would also remove the space between function and ()


#3

Oh, yes, thank you. How did I not see that lol.