/GAME-Guess-My-Number

This game is great example for Java Script begginers to learn fundamentals of HTML, CSS and Java Script.In this example we can learn to use DOM manipulation, how to use Event Listeners and buttons and how to manipulate with CSS styles using Java Script.

Primary LanguageJavaScript

GAME-Guess My Number

GAME-Guess-My-Number

About the game:

This game generates random number between 1-20.Start value for score is 10 and each time when you enter the wrong number you lose 1 point.

When you enter the wrong number, you also get a message “Too low” or “Too high”, depends of the number you entered.

The highest score you can get is 10, if you guess the number from the first attempt.As we can see on the picture above, we lost 2 points, because we guessed the number from 3rd attempt.Then in the field the highest score will be our score as the highest, which is 8, because we played first.

Then from round to round as we play, we need to beat that highest score which is 8 and if let's say we get 9, then 9 will be our highest score, it will no longer be 8.

If we want to play the game again, we need to press the button “Again”.

In case we lose all our points, all 10, then we get the message GAME OVER.

What we can learn:

This game is great example for Java Script begginers to learn fundamentals of HTML, CSS and Java Script.

In this example we can learn to use DOM manipulation, which is one of the most important fundamentals of Java Script.

In this example we can also learn how to use Event Listeners and buttons, so we can have interactions with our game and we also learned how to manipulate with CSS styles using Java Script and much more.