javascript - if/ else statement not working? -
i'm new coding, , cant figure out doing wrong. every time try write if/ else, works point statement is, , wont work.
this wrote:
alert("welcome chloe's quiz show!") var name = prompt("contestant, name?") var = prompt("is first time playing? type 'yes' or 'no'.") if (help === yes){ alert("the game easy! have type letter corresponds correct answer. press 'ok'.") confirm("lets started!") } else{ confirm("lets started then!") }
change line:
if (help === yes)
to this:
if (help == "yes")
since yes
not variable.
Comments
Post a Comment