In my case, I personally implemented a different approach.
I hid the "Again!" button from the start (since there is no point in it being visible).
Once the game finishes, I hide the "check" button, and display the "again" button in its place.
Since, the "check" button would be hidden, the player can't continue playing the game any longer (they have to click "again" to play again).
I'm guessing Jonas didn't use such an approach because he shows working with CSS classes (hiding objects etc.) later in the Modal window project. But it could be introduced in this guess my number game as well.
Owner Name | jonasschmedtmann |
Repo Name | complete-javascript-course |
Full Name | jonasschmedtmann/complete-javascript-course |
Language | JavaScript |
Created Date | 2018-06-14 |
Updated Date | 2023-03-29 |
Star Count | 12137 |
Watcher Count | 850 |
Fork Count | 14403 |
Issue Count | 153 |
Issue Title | Created Date | Updated Date |
---|