Number Guesser

This is a small program I created for my Javascript class. An alert pops up telling the user to guess a number between 1 and 100. The user can enter a guess and another pop up will appear and tell the user if their guess was too high or too low. The user can keep guessing until they guess the correct number and then an alert will pop up telling the user how many guesses it took. Another pop up will then appear asking the user if they would like to play again.

The code for this program has it running with a for loop and then running again with a while loop.

Click to view code

Screen Shot 2015-12-28 at 4.10.14 PM

Screen Shot 2015-12-28 at 4.10.19 PM

Screen Shot 2015-12-28 at 4.10.23 PM

Screen Shot 2015-12-28 at 4.10.34 PM

Screen Shot 2015-12-28 at 4.10.45 PM

Screen Shot 2015-12-28 at 4.10.52 PM