我是新手好吗?我只是不明白我的代码有什么问题,如果有人可以修复它,请向我解释...
代码:
<script>
var userMoney:10;
var userChoice = prompt("Okay young lad, you've got 3 choices, either you choose box 1, 2 or 3");
if(userChoice==="1"){
confirm("Wow. You're just that lucky, you've got 10$ added to your account");
}
if(confirm("Wow. You're just that lucky, you've got 10$ added to your account"){
userMoney:10+10;
}
var yesno = prompt("Would you like to see how much money you've got lad?");
if(yesno==="yes"){
confirm(userMoney)
} else {
confirm("Well lad I Guess that's the end of the game.");
}
if(userChoice==="2"){
confirm("Oi, bad luck Brian better luck next time");
}
if(userChoice==="3"){
confirm("Oi, bad luck Brian better luck next time");
}
</script>