Javascript restart prog | Sololearn: Learn to code for FREE!


Javascript restart prog

I do a little program in Javascript. I wanted to do a prompt wich ask if yes or not restart the prog. how can I do ? Thanks :)

7/27/2017 6:57:44 PM


2 Answers

New Answer


var restart = confirm("Restart the game?"); if (restart) doSomething; else doNothing;


thanks !