+ 1

How can I make a reset button for a game in Java script

21st Dec 2020, 10:25 PM
Walid Gaber
Walid Gaber - avatar
6 Respostas
+ 2
But what to reset ? First you need to be clear about what you are working on and what state you expect to reset when a button is clicked , generally speaking, you can store the new state of your game in an object or in an array ,and when reset button is clicked pop or delete the new state
21st Dec 2020, 11:05 PM
Abhay
Abhay - avatar
+ 1
Please be clear in your Q. If i get you right , you make the button with html tag and add an Event listener to that btn in your js code. when the btn is clicked the game start over or something
21st Dec 2020, 11:00 PM
Med Amine Fh
Med Amine Fh - avatar
22nd Dec 2020, 5:28 AM
Walid Gaber
Walid Gaber - avatar
0
I want the game to start again without reloading the page
22nd Dec 2020, 5:29 AM
Walid Gaber
Walid Gaber - avatar