Problem With 'I have to celebrate you baby'


#1

https://www.codecademy.com/courses/spencer-sandbox/0/4?curriculum_id=506324b3a7dffd00020bf661#

Hello. I'd appreciate it if you could help me with this problem. My code is working correctly and I did exactly as I was supposed to, but the page keeps giving me an error: "Oops, try again. Better use a switch statement ".

var getReview = function(name)
{
    switch(name)
    {
        case "Toy Story 2":      
            return "Great story. Mean prospector.";
            break;
        case "Finding Nemo":
            return "Cool animation, and funny turtles.";
            break;
        case "The Lion King":
            return "Great songs.";
            break;
        default:
            return "I don't know!";
            break;
    };
};
getReview("Toy Story 2");

As you can see, I tried calling the function, it was working correctly and the interpreter gave me the correct review, but the page keeps telling me that I didn't use a switch statement. Why is that?
Thanks in advance.


4. I have to celebrate you baby
#2

An Update:
The problem was successfully solved, it turns out I just needed to do a reset, keep the original function and then add the switch statement.


#3

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