4. Celebrate you baby - Syntax Error


I keep getting a syntax error saying that ")" is missing after argument list. I hvae tried resetting the browser to no avail.

Anyone know whats wrong with the code?

Thanks in advance

var toyS = {
title: "Toy Story 2",
review: "Great story. Mean prospector."

var findingN = {
title: "Finding Nemo",
review: "Cool animation, and funny turtles."

var lionK = {
title: "The Lion King",
review: "Great Songs."

var getReview = function(name){
switch(name) {
case "Toy Story 2":
return toyS.review;
case "Finding Nemo":
return findingN.review;
case "The Lion King":
return lionK.review;
return "I don't know!"

console.log(getReview(The Lion King));


Hi there! First of all, add a break; line for each of the cases, except for the default as it is at the end. Secondly, add a semicolon after "I don't know!". Lastly, use double quotation marks or single ones, as you wish, for getReview("The Lion King")

I hope this will fix the error :smile: Let me know if it doesn't


You want to call the getReview =function=
with an string Value "The Lion King"

 console.log(getReview("The Lion King"));

As you are using the return statement
you do not need a break-statement in your switch !!


That did it! Thanks for the help! and the confirmation about those return statements.