O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

Getting the player’s guess from the form

The Fire! button is what initiates the guess, but the player’s guess is actually contained in the “guessInput” form element. We can get the value from the form input by accessing the input element’s value property. Here’s how you do it:


Cover of Head First JavaScript Programming


How to get the guess input?