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:
How to get the guess input?