I have to celebrate you baby


#1


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


Hi there, I tried to fix it but even though the console returns the correct string it keeps giving me this error: Oops, try again. Better use a switch statement. Can someone please help me? Thanks guys!


var UserChoice = prompt("Which movie do you want to watch?");
var getReview = function (movie) {
    switch(UserChoice) {
        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;
}
};
console.log(getReview(UserChoice));


#2

in your switch statement you need to use movie


#3

Thank you! My code works now!


#4

Good! Glad to help! Happy coding! :smiley:


#5

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