4. I have to celebrate you baby


#1


some one that can spot the error, because i can't.

Error message:
Oops, try again. Check the review of Finding Nemo


var movie = prompt("Hvad for en film vil ddu vide noget om. Valgmuligheder: Toy Story 2, Finding Nemo, The Lion King.")

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(movie);


#2

the code needs a " . " in the line: error linge ->return "Cool animation, and funny turtles";

the working line: return "Cool animation, and funny turtles.";


#3

I get a "ReferenceError: movie is not defined" when calling movie. It works well if I call the movies by their strings like getReview("Toy Story 2"); etc.

Any ideas to why? I ask because I don't know...

And yes, I also spotted your "." :slight_smile:


#4

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