4. I have to celebrate your baby. Code works! Not accepting


#1

4 . I have to celebrate your baby

The code works and produces the correct output but Code Academy will not accept it and let me on to the next exercise


var movie = prompt("Enter a movie");    

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 "Finding Nemo":
            return "Great songs";
        break;

        
        default:
            return "I don't know!";
        break;
    };
};

getReview(movie);


#2

Perhaps it gives a reason for not accepting it, and perhaps you have a link to the exercise


#3

Ah! I have got it to work now. I had the Finding Nemo review twice in there. Once I added The Lion King it seemed to work! It was originally saying "Check your review of Toy Story 2"

Thanks for the response!


#4

Can Anyone help with this? Console logging right answers for each movie. I dont know why Codea doesn't let me to pass. Says to call The LInon King and I am calling

movie = prompt("Enter The name of movie!");

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


#5

Sorry Guys I need to put "." period after the name of "THE LION KING ."


#6

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