Title | Type | tags | status | DateStarted | DateModified | aliases | ||
---|---|---|---|---|---|---|---|---|
Number Guessing Game |
A |
|
2023-09-13 |
2023-12-05 |
|
A Number Guessing Game based on vanilla JS, HTML, CSS, to enhance developer's fundamental knowledge and skills in JS, HTML, CSS.
- Guess a Random Number
- User can enter and submit any number from 1-100 to match the random number generated behind the scene.
- Get Clue and Result
- When the number was submitted, the user will get a message showing whether the guess is lower or higher or correct.
- Submit History
- User can see previous incorrect guesses.
- Limited Chance
- Each user can guess at most 10 times each round before getting the correct answer.
- When out of chance, the user will receive a message showing the game is over and will not be able to continue the game.
- Replay Button
- When game is over, the user can click a button to replay the game.
- [[HTML]]
- [[HTML-Link]]
- [[Input and label]]
- [[Button]]
- [[JavaScript]]
- [[Value and Variables]]
- [[Math]]
- [[Operators]]
- [[Conditionals]]
- [[String]]
- [[DOM]]
- Select needed elements
- Init the App Data
- key: random number from 1-100
- guessCount: 1
- guess: ""
- lastResult: ""
- guessHistory: ""
- Implement Core Functions
- Logic
- ![[A-JS Number Guessing Game 2022-12-08 09.49.04.excalidraw]]
- Logic
- Add Event Listeners (Call the Callback function)