Skip to content

"A fun and interactive Number Guessing Game built with JavaScript. It uses random number generation and logic to guide the user to the correct answer. ๐ŸŽฎ"

Notifications You must be signed in to change notification settings

parvez078/javaScript-number-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 

Repository files navigation

javaScript-number-guessing-game

"A fun and interactive Number Guessing Game built with JavaScript. It uses random number generation and logic to guide the user to the correct answer. ๐ŸŽฎ"

๐ŸŽฏ Number Guessing Game in JavaScript

Welcome to the Number Guessing Game! This is a simple logic-based game where the computer selects a random number between 0 and 100, and the player has to guess it.

๐Ÿ•น๏ธ Features

  • Random Number Generation: Uses Math.random() to generate a new challenge every time.
  • Smart Hints: Tells the user if their guess is "Too Big" or "Too Small".
  • Infinite Loop: The game continues until you find the correct number.

๐Ÿ› ๏ธ How it Works

  1. The computer picks a number between 0 and 100.
  2. The user is prompted to enter a guess.
  3. If the guess is correct, the user wins! ๐Ÿ†
  4. If not, the game provides a hint and asks for another guess.

๐Ÿš€ How to Run

Using Browser Console:

  1. Open any web browser (Chrome, Firefox).
  2. Press F12 to open Developer Tools.
  3. Go to the Console tab.
  4. Copy and paste the code from index.js and press Enter.

Using Node.js:

Note: Since prompt() is a browser function, if you run this in Node.js/GitHub Codespaces, you will need to replace prompt with a library like prompt-sync.

๐Ÿ“‚ File Structure

  • game.js: Contains the main game logic.
  • README.md: Project documentation.

๐Ÿท๏ธ Keywords

  • JavaScript Games
  • Logic Building in JS
  • Math.random JavaScript
  • Programming Exercises for Beginners

About

"A fun and interactive Number Guessing Game built with JavaScript. It uses random number generation and logic to guide the user to the correct answer. ๐ŸŽฎ"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published