4. I have to celebrate you baby (I'm pulling my hair out)


So this is where I am stuck. I had console.log statements in there and I have since changed them to return statements. I had break statements in there as well and I have since removed them. I have checked my spelling and punctuation repeatedly and I'm jut not seeing it. I have reviewed the other topics and have compared line, by line and I feel like my code should run.
Anyone see something that I am obviously not?


The error that I am getting is:
SyntaxError: Invalid or unexpected token

var choice = prompt ("Choose a movie to obtain a review: Toy Story 2, Finding Nemo, or The Lion King");
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!";



Many thanks


Be sure to include an argument in this function call.


Thank you.
So with that being said, in this particular exercise, there is no reason to have a prompt.
Because you are actually answering the question within the code?


It is not asked for, so no reason, per se. In a broader sense, the prompt would be for a user to enter the name of a film and then the program would call the function with that value. We are only working out the basic switch here, and that is what the lesson checker is expecting. It tests with its own pre-defined values, such as "Toy Story 2".


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