Switch


#1

so this code runs but it still gives me a warning message saying "Oops, try again. Check the review of Toy Story 2". so the code is good but why doesn't it let me go on further? My message for toy story case is as per the instructions as well.

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;
}};
var name = prompt("Which movie do you want the reviews?").toLowerCase();
getReview(name);


#2

I changed the code to below. Capitalizing the first letter in the names of the movies but it now asks me to check the review for The Lion King. I don't understand.

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;
}};
var name = prompt("Which movie do you want the reviews?");
getReview(name);


#3

The "Great songs" needs a period.
They are sooooooo picky


#4

Thank you Sir for taking the time to go through it.


#5

The names you put in movies are in small caps instead of Capitalising every first letter