在下面的 javascript 代码中,我看到使用了 command 函数,但它没有指定函数的名称。这是怎么回事?
var getReview = function(movie) {
switch (movie) {
case "Matrix":
return "good trip out";
break;
case "Princess Bride":
return "awesome date night movie";
break;
case "Welcome to America":
return "Amjad's favorite";
break;
case "Remember the Titans":
return "love the sports";
break;
case "Why do I look like I'm 12?":
return "The Ryan and Zach story";
break;
case "Fighting Kangaroos in the wild":
return "Token Australian movie for Leng";
break;
default:
return "I don't know!";
}
};