嘿,我现在正在尝试使用 TwilioQuest 学习 JavaScript,但我遇到了似乎无法解决的问题。
我正在尝试更正错误“SyntaxError: Unexpected Identifier”。当我尝试运行这段代码时,我得到了。
Function getLaserSetting(magicWord) {
if (magicWord === 'please') {
return 'OFF';
} else {
Return 'ON';
}
}
const currentSetting = get LaserSetting('please');
console.log('The current laser setting is' + currentSetting);
原始代码是:
function getLaserSetting(magicWord) {
if (magicWord === 'the magic word here') {
return 'what should this be?';
} else {
return 'ON';
}
}
const currentSetting = getLaserSetting('right now!');
console.log('The current laser setting is: ' + currentSetting);
隔江千里
相关分类