4/33 could somebody help me?


#1

it just says " Are you sure you're returning the right thing?" its problablysome dumb typo but i cant figure out why it isnt working..

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: 
 console.log("I don't know!");

}
};

getReview("Toy story 2");


#2

where to start? return should just return a string, no need to use ():

return "Great story. Mean prospector.";

default should also return, instead you use console.log
Check all your cases (not all capitalized match up to what th exercise ask of you)
your Lion King return Great songs, it should return: Great songs.
you forgot the dot.

Hope i covered it all


#3

Aside: I bitched for years about people writing, return("something"); or return ("something"); insisting it was pointless or misleading. Then I discovered through my own reading that either way of writing a return statement is perfectly valid, and some style guides even insist upon it. However, I am still in complete agreement with you that it is unnecessary, and may even make it harder to read the code.


#4

thanks for the help, got it today :smiley: Are you norwegian stetim94 ?