我是编码新手,我无法弄清楚我做错了什么。每次我尝试编写 if/else 时,它都会一直运行到语句所在的位置,然后它就不起作用了。
这就是我写的:
alert("welcome to chloe's quiz show!")
var name = prompt("contestant, what is your name?")
var help = prompt("is this your first time playing? type 'yes' or 'no'.")
if (help === yes){
alert("the game is easy! all you have to do is type the letter that corresponds with the correct answer. then press 'ok'.")
confirm("lets get started!")
}
else{
confirm("lets get started then!")
}