4/33 What's wrong?


#1

var name = prompt("Which movie?");
getReview(name);

var getReview = function (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.";
    default:
        return"I don't know!";

}

};


#2

this works for me!

var getReview = function (movie) {

switch(movie) {
case "Toy Story 2":
// return review here
return("Great story. Mean prospector.");

case "Finding Nemo":
    // return review here
    return("Cool animation, and funny turtles.");

case "The Lion King":
    // return review here
    return("Great songs.");

default:
    // code to be executed if a movie name is not found
    return("I don't know!");

}

};

getReview("The Lion King");


#3

var name = prompt("Which movie?");
getReview(name);
This was unneeded as the question did not look for this. Take it out and it should be fine.


#4

worked for me. I was using console.log instead of return key word