+ 1

Hi guys can you please help me with this

Can you put restart button to restart this game? https://code.sololearn.com/WBy57Bs4EXlk/?ref=app

10th Jan 2023, 4:18 AM
jepp
jepp - avatar
2 Answers
+ 3
That can be done for example in this way(the restart button will be visible only after the end of each game): https://code.sololearn.com/WHBo0mMCnf8X/?ref=app
10th Jan 2023, 5:34 AM
JaScript
JaScript - avatar
0
Get used to put each language (HTML, CSS and JS) in the corresponding tab. That makes your code more organized, readable and mantainable. Just remember to wrap the JS part in an onLoad function, so it only loads after HTML part is loaded, then all elements exist. That said, just wrap the code in an infinite loop, which prompts the user at its end to just press the button.
10th Jan 2023, 5:04 AM
Emerson Prado
Emerson Prado - avatar