Skip to content

A fun browser-based number guessing game built using JavaScript. The player guesses a number between 1 and 100, and receives feedback until the correct number is guessed. This project helped me practice conditionals, functions, recursion, and user interaction using prompt() and alert().

Notifications You must be signed in to change notification settings

likhithnd/Guess-the-Number---JavaScript-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Guess the Correct Number โ€“ A JavaScript Game

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.


๐Ÿ”ง Features

  • 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

๐Ÿš€ How It Works

  1. 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() and alert()

About

A fun browser-based number guessing game built using JavaScript. The player guesses a number between 1 and 100, and receives feedback until the correct number is guessed. This project helped me practice conditionals, functions, recursion, and user interaction using prompt() and alert().

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published