+ 1

Guesses

How do you let user know how many guesses it took to guess the number in JavaScript for guessing a random number?

11th May 2018, 11:00 PM
love
3 Respostas
0
How would that code look like in the function
11th May 2018, 11:08 PM
love
0
How do you display the number of guesses to the user when they get it right
11th May 2018, 11:23 PM
love
0
make a div with i.e. id="guesses" and display it like this <div id="guesses"></div> <script> var AmountOfGuesses=0; document.getElementById("guesses").innerHTML=AmountOfGuesses; </script>
11th May 2018, 11:26 PM
Roel
Roel - avatar