Guess My Number is a game that prompts the user to guess THE number. It generates a random number between 1 and 20 and the user can input their guess until their score turns 0. The game mechanincs use the DOM structure to connect all the variables and elements. A fun silly little game to learn JavaScript, CSS, and HTML.
HTML:index.htmlThe main HTML file that structures the game's elements.CSS:style.cssThe CSS file that styles the appearance of the game.JavaScript:script.jsThe JavaScript file that contains the game's logic and functionality.
To play the game locally on your computer, follow these steps:
-
Clone the repository using Git.
- Run the following command in your terminal:
git clone https://github.com/EsaZhu/Guess-My-Number.git
- This command will create a new folder named
Guess-My-Numberin your current directory and download all the files from the GitHub repository into it.
- Run the following command in your terminal:
-
Open the
index.htmlfile in your web browser.- Once the cloning is complete, navigate into the newly created
Guess-My-Numberfolder in your file explorer. - Double-click on the
index.htmlfile. This will open the game in your default web browser.
- Once the cloning is complete, navigate into the newly created
- Open the
index.htmlfile in your browser. - You will see a number guessing game interface.
- Enter your guess in the input field.
- Click the "Check!" button to submit your guess.
- The game will provide feedback on whether your guess is too high, too low, or correct.
- Try to guess the secret number within the given range.
- You can click the "Again!" button to start a new game with a different secret number.
If you have any suggestions or find any issues, feel free to open a pull request or submit an issue on the GitHub repository.
This project is likely under the default GitHub terms unless a specific license file is included in the repository.


