我是新手学习JS,今天我尝试练习一下所学的东西,但我无法让控制台输出任何内容。我的“早上好”弹窗可以正常工作,初始提示问题也可以,但一旦我回答“是”或“否”,一切都停止了。这是我的代码:
alert("Good morning!");
var hireMe = prompt("Are you here because you're interested in hiring me?");
if (hireMe === "yes") {
console.log("You've just made my day. Carry on.")
}
else {
console.log("Well, I hope you're at least thinking about it.")
}
感谢您的选择。