Skip to content

Latest commit

 

History

History
76 lines (30 loc) · 2.07 KB

README.md

File metadata and controls

76 lines (30 loc) · 2.07 KB

Guess The Number Game

Guess the number game (Store random number from 1 to 100)

How to play :

==> Guess the number game ask user What's your guess? If the user entered a random number that is bigger than the correct number will say Your guess is too high!. If the user entered a random number that is smaller than the correct number will say Your guess is too low!. If the user entered the correct number will say Awesome job, you got it!. It allows the user to reset the game at any time they wanted. (Built with HTML, CSS, JavaScript)

When the user guess is smaller than correct number

image

When the user guess is bigger than correct number

image

When the user guessed the correct number

image

DONE

DONE : Get user value from input and save it to variable numberGuess

DONE : Generate a random number 1 to 100 and save it to variable correctNumber

DONE : Console whether the guess is too high, too low, or is correct inside playGame function

DONE : Create a function called displayResult to move the logic for if the guess is too high, too low, or correct

DONE : Complete the showYouWon, showNumberAbove, showNumberBelow

DONE : Use the showYouWon... functions within displayResult to display the correct dialog

DONE : Save the guess history in a variable called guess

DONE : Display the guess history using displayHistory() function

DONE : Use the initGame() function to restart the game

TODO

TODO : Improve the code efficiency as much as possible