I have to celebrate you baby-Error


#1

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 = ("Toy Story 2");

The above code shows "Oops, try again. getReview must be a function". Please help.


#2

here:

getReview = ("Toy Story 2");

you assign getReview a string, while you should call the function


#3

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