4. I have to celebrate you baby


#1

I always miss something really simple when I get stuck, thanks in advance for your help!

The error code is: Oops, try again. Are you sure you're returning the right thing?

I know I am as I've copy pasted the return values 3 times in the end!

var title = prompt("What is your favourite movie?");

var getReview = function(movie) {

 function getReview(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!";
}
};
};

#2

You wrap your getReview function in another getReview function and it is not called anywhere. So get rid of the outer function and call the inner one to see if it is working.


#3

Thanks! Not entirely sure how I ended up with 2 of those! ':smiley:


#4

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