Javascript > Objects I > 4. I have to celebrate you babe


#1



The code return the correct review on the console log, however I keep getting the error message: "Oops, try again. Check the review of Toy Story 2" no matter which movie I look for.


var movie = prompt("Search for a movie review");

var getReview = function (movie) {
    var movie 
    switch (movie) {
        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";
    };
};

getReview(movie);


#2

the strings returned should be an exact match, for example for toy story 2 a . is missing after prospector


#3

Lol... I feel stupid right now. I've checked the code dozens of time but never saw that. Now it works! Tks very much!!!


#4