Help?


#1

SyntaxError: Unexpected token case


var getReview = function (movie) 
{
    case "Toy story 2":
        "Great story. Mean prospector";
        break;
    case "Finding Nemo": 
        "Cool animation, and funny turtles";
        break;
    case "The lion king";
        "Great songs";
        break;
    default: 
        "I don't know";
        break;
};
getReview();


#2

HI this line

"Great story. Mean prospector";

before it you should add return

return "Great story. Mean prospector";

do the same for the others..


#3

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";
break;
default:
return "I don't know"
break;
};
getReview();

"SyntaxError: Unexpected token switch
"


#4

You didnt open and close the getReview function

var getReview = function (movie) {
   #here put your switch statement
};

#5

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.";
break;
default:
return "I don't know"
break;
};
}
getReview();

why:
Oops, try again. Check the review of The Lion King


#6

Now you should see if the review of the Lion King match with the on they give in the instruction


#7

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