JavaScript final trial for the Web Application Developer training course, by Interface3. The main goal was to code a client-side application.
You can try it here 👉 https://belynnn.github.io/I3_WAD_JS__guess_the_number/
In this project, you will create an interactive number guessing game using HTML, CSS, and JavaScript. The aim of the game is to guess a random number between 1 and 100 in less than 10 attempts. The player will receive hints after each attempt as to whether the guessed number is too high or too low.
- Generation of a random number between 1 and 100.
- Management of user attempts with hint messages.
- Displays a table summarising previous attempts.
- Values are highlighted when they are within 5 of the value to be guessed.
- Ends the game when the number has been guessed or when all the attempts have been made.
-
HTML
- Structure the page with a section for the game and a section for the attempts summary.
- Use appropriate semantic tags.
-
CSS
- Style the interface to make it clear and attractive.
- Use CSS classes for the different parts of the game.
-
JavaScript
- Implement the game logic.
- Manipulating the DOM to display messages and the summary table.
- Managing user input events (click and "Enter" key).
Don't forget to comment on your code to explain the different parts and how they work. (Don't comment on all the lines, just the functions).
You can give free rein to your imagination to add bonus elements such as a timer, for example. Please mention them in the comment at the beginning of the script.