Why is the code not logging to the console?


#1

Am trying to figure out why this code isn't logging anything to the console, pls help

var movie = prompt("Enter a movie").toUpperCase();

var getReview = function (movie) {
switch(movie){
	case "TOY STORY 2":
		 console.log("Great story. Mean prospector.");
		break;
		
	case "FINDING NEMO":
		console.log("Cool animation, and funny turtles");
	    break;
		
	case "THE LION KING":
		console.log("Great songs");
        break;
		
	default:
	 console.log("I don't know");
}
};

#2

To see the function execute we need to call it...

getReview(movie);

Aside

When names are provided in the instructions we should make every effort to preserve them as given, meaning in proper name form, not uppercase.

"Toy Story 2"
"Finding Nemo"
"The Lion King"

One question... Do the instructions ask us to log the review or return it?


#3

Thanks, i now see what was missing. Well the instruction said 'return', i av already done that. I jus wanted to experiment further on the code.


#4

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