Why it says my function isn't a function?


#1



https://www.codecademy.com/en/courses/objects-ii/2/5?curriculum_id=506324b3a7dffd00020bf661#


I'm getting error saying my function isn't a function .... can you see 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");

Cat.prototype.meow = function() {
    console.log("Meow!");
};


Cat.meow();


#2

Cat is the object, you want to make one of your cats (cheshire or gary) meow:

gary.meow()

#3

Ohh .... all right .. misunderstood what I'm asked to do. Cheers stetim94 !


#4

meow is a method, you call methods on the instances of your object (gary). Just some more information, i know you find that important


#5

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