This project is a web application developed as part of The Complete JavaScript Course 2024: From Zero to Expert!.
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.
- User-friendly interface
- Randomly generated target number
- Feedback on each guess
- Score tracking to keep record of the user's performance
To get started with the Guess-My-Number website, follow these steps:
- Clone the repository to your local machine.
- Open the
index.html
file in your web browser. - Start playing the game by entering your guesses and following the prompts.
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.
You can try out the live demo of the Guess-My-Number website here.
- This project was developed as part of The Complete JavaScript Course 2024: From Zero to Expert! course.
- Special thanks to the course instructor for providing guidance and resources.