This is a simple interactive number guessing game built using HTML and JavaScript. The user is prompted to guess a number between 1 and 100. Based on the guess, the program gives hints like "Enter a bigger number" or "Enter a smaller number" until the correct number is guessed.
- Random number is generated between 1 and 100
- User input is taken using
prompt()
- Provides real-time hints
- Displays number of attempts taken to guess the correct answer
- A random number is generated using:
Math.floor(Math.random() * 100 + 1)
Let me know if you'd like:
- A live preview version on GitHub Pages
- Or convert it into a styled version with HTML/CSS instead of just
prompt()
andalert()