Movie reviews


totally screwed up?

SyntaxError: Unexpected identifier
Oops, try again. There was a problem with your syntax.

var movie = {
    toyStory: {
        name: "Toy Story 2",
        review: "Great story. Mean prospector"
    findingNemo: {
        name: "Finding Nemo",
        review: "Cool animation, and funny turtles"
    LionKing: {
        name: "The Lion King",
        review: "Great songs"

var getReview = function (movie) {
    switch (movie) {
        case toyStory: 
        case findingNemo:
        case lionKing:


It never says to create a variable for the movies.

You're just supposed to write a switch statement that cycles through an unknown yet assumingly existent input.

I would recommend hitting reset code and rereading the instructions.

Hope I Helped :slight_smile:



but would the code be good in another circunstance?


Mostly. My only critique is that in your function, you use "movie" for a parameter.

It's never a good idea to use a variable when creating a function.

And for your cases, you would need to either make it known that toyStory was a property of "movie", or you would want to add quotes.


thank you for your help


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