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

+6

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

NoxFly

2 Answers

New Answer

+10

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

+7

thanks !