+ 1

Plz click on the start button and play for five round and after that you will see that the letters are coming automatically.

I don't know why this is happening.plz help me.thanks in advance https://code.sololearn.com/WGbgLbpgykYh/?ref=app

6th Jun 2020, 1:50 PM
Aditya sahani
Aditya sahani - avatar
1 Respuesta
0
The random character effect you see is due to invoking gameStart() within gameStart(), aka recursion, via the setimeout() inside of the clickHandler(). One way to resolve this problem is to move the clickHandler outside of the gameStart() you will also have to define the variable ans outside of gameStart(). The number of timers created every time a button is clicked while the clickHanlder() is inside gameStart(). https://code.sololearn.com/WlAHCyGBEWFO/#html Timers created when clickHanlder() is outside the gameStart() https://code.sololearn.com/WzJ1r7FP2ITj/#html
6th Jun 2020, 9:34 PM
ODLNT
ODLNT - avatar