var movie = prompt("Type the movie title you want reviewed");
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!";
}
};
当我提交上述代码时,我收到错误消息: SyntaxError - missing : after case label。语法有什么问题?