请问这个为什么会报错呢,检查了好几遍,谢谢!
let athleteFinalPosition = 'first place';
switch (athleteFinalPosition) {
case 'first place':
console.log('You get the gold medal!');
break;
case 'second place':
console.log('You get the silver medal!');
break;
case 'third place':
console.log('You get the bronze medal!');
break;
}
console.log('You get the gold medal!'); 中文的分号
你没发现每行的分号长的都不一样吗
再说报错信息都写的很清楚了,^符号指向的就是具体出错的字符
不要用中文全角符号
下次再有报错,仔细看报错信息,不要靠猜