PHD Kitty JavaScript

// Teach your pet to answer questions!

// Luckily, all the answers are "2"
function sayTwo(event) {
    // Use pet.say() to answer "2"
    pet.say("Two");
}
function say2(event){
    pet.say(2);
}
function sayToo(event){
    pet.say("two");
}
// Use pet.on() to handle "hear" events with sayTwo
pet.on("hear", onHear);
// Now relax and watch the show.
hero.say("One plus one is...?");
hero.say("x^3 - 6x^2 + 12x - 8 = 0. What is x...?");
hero.say("How many moons does Mars have...?");

I am not sure what I am doing wrong because it keeps telling me the
Pet.on(“hear”, onHear);
keeps giving me an error. what am I doing wrong please.
I am using the cat by the way, thanks
Rinlore

Pet.on(“hear”, onHear) is supposed to be pet.on(“hear”, sayToo)

1 Like

thanks that helped a lot
Rinlore

Your welcome(20 chars)

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