This document contains code for a number guessing game that randomly generates a secret number between 1 and 100 and prompts the user to guess it. The code tracks the number of guesses and provides feedback if the guess is too low or high, declaring the user the winner if they correctly guess the secret number. It then prompts the user to play again, reloading the page if they choose yes.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
115 views1 page
Guess Number Game in Javascript
This document contains code for a number guessing game that randomly generates a secret number between 1 and 100 and prompts the user to guess it. The code tracks the number of guesses and provides feedback if the guess is too low or high, declaring the user the winner if they correctly guess the secret number. It then prompts the user to play again, reloading the page if they choose yes.