4. Please tell me what I'm doing wrong, as the error says "Oops, try again. There was a problem with your syntax."


#1

Hi,

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

Please tell me what I'm doing wrong, as the error says "Oops, try again. There was a problem with your syntax." :frowning:


4. I have to celebrate you baby
#2

Write a function named getReview that takes in a movie name and returns its review

You're asked to write a function getReview to which within that function you use the switch statement..

Try reviewing you're second line of code :smiley:


#3

You have a; on line 2 which is incorrect. Also, the case return statements need a ; at their end just like what you have after default


#4

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