Introduction to Objects I I have to celebrate you baby


#1

What is wrong with my code?

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 "The Lion King" "Great songs.";
break;
default:
return "I don't know!";
break;
}
};


#2

Hi @digitalblaster24420,

At a quick guess without being sure what error yo are getting, you have coded for 2 separate strings in your third case return, this could be either one string or use concatenation, which ever you prefer.
If this does not resolve your error, please post what you are encountering and someone will try to get back to you as soon as possible

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 "The Lion King. Great songs."; //2 separate strings or no concatenation
    break;
    default:
    return "I don't know!";
    break;
    }
};

#3

Thanks, I had the lion king twice instead of once