What is wrong in my code in Introduction to objects-1...Ch-4?Kindly help

var getReview = function(movie) {

    switch (movie) {
        case "Toy Story 2":
            return "Great story.Mean prospector.";
        case "Finding Nemo":
            return "Cool animation,and funny turtles.";
        case "The Lion King":
            return "Great songs.";
            return "I don't know!";


console.log(getReview("Toy Story 2"));


Please format your post as I have done (select entire code block; press Ctrl+Shift+C) from next time. Thanks! :smile: Please always use http://jsbeautifier.org/ to properly format your code. Thanks! :smile:

Please post the error you are getting. Thanks! :smile: But I can guess that you have an extra semicolon after switch block.


The error I'm getting is 'Try again.Check the review of Toy Story 2'.Which extra semi colon are you talking about?Kindly reply.


The SCT is very strict about string messages. Make sure you copy the string exactly as shown in the left panel. I think the string you return for Toy Story 2 ("Great story.Mean prospector.") causes the error.

I was talking about the extra semicolon on fifth-last line.


Hey,thanks a lot.I got the correct answer :smile: