Skip to content

A number guessing game built with JavaScript. Users try to guess randomly generated number between 1-20 in as few attempts as possible.

Notifications You must be signed in to change notification settings

AhmedMohamedAbdelaty/Guess-My-Number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guess-My-Number

This project is a web application developed as part of The Complete JavaScript Course 2024: From Zero to Expert!.

Description

The Guess-My-Number website allows users to play a number guessing game. The user is prompted to enter a number within a specified range, and the application will provide feedback on whether the guess is too high or too low. The goal is to guess the correct number within the fewest attempts possible.

Features

  • User-friendly interface
  • Randomly generated target number
  • Feedback on each guess
  • Score tracking to keep record of the user's performance

Getting Started

To get started with the Guess-My-Number website, follow these steps:

  1. Clone the repository to your local machine.
  2. Open the index.html file in your web browser.
  3. Start playing the game by entering your guesses and following the prompts.

What I Learned and What I Did

In this project, I learned how to create a number guessing game using JavaScript. I used the following concepts and techniques:

  • Generating a random number within a specified range using the generateRandomNumber function.
  • Handling user input and validating it to ensure it is a valid number within the specified range.
  • Providing feedback to the user based on their guess, such as whether the guess is too high or too low.
  • Keeping track of the number of attempts remaining and updating the score accordingly.
  • Updating the high score if the user guesses the correct number within the fewest attempts.
  • Resetting the game and generating a new random number when the user chooses to play again.

This project helped me practice my JavaScript skills and understand how to manipulate the DOM to create interactive web applications.

Screenshot

Guess-My-Number Screenshot

Live Demo

You can try out the live demo of the Guess-My-Number website here.

Acknowledgements

About

A number guessing game built with JavaScript. Users try to guess randomly generated number between 1-20 in as few attempts as possible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published