Stuck on Objects 1 #4 "I have to celebrate you baby"


I'm stuck on Objects 1 #4 "I have to celebrate you baby".

The code does exactly what it's supposed to, as far as I can tell, but I keep getting an error message saying "Oops, try again.
Are you sure you're returning the right thing?" I've checked the spelling and grammar of the 'reviews' the code is returning, and I've also tried replacing the console.log with return, but for some reason it still isn't working. Can anyone help?

var getReview = function(movie) {
    var movie = prompt("What movie would you like to watch?")
    switch(movie) {
        case "Toy Story 2":
            console.log("Great story. Mean prospector.")
        case "Finding Nemo":
            console.log("Cool animation, and funny turtles.")
        case "The Lion King":
            console.log("Great songs.")
        console.log("I don't know!")

I can't work out why it isn't working. Please help!



The key word here is returning, in your function you are logging the results to console but you should be returning them with the return keyword instead.
Also you have to move the first line in your function outside of it.
When you you call your getReview function you then pass what ever the user enters as argument


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