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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -