+ 2

Help with setTimeout

I am trying to get the quadrants to light up one at a time but they all light up together. https://code.sololearn.com/WYGZ0QKXYgGa/?ref=app

18th Nov 2021, 8:20 PM
Margaret Guzman
Margaret Guzman - avatar
2 odpowiedzi
+ 3
use setInterval instead to light up the selected quadrant after some interval. https://code.sololearn.com/WjCPbvnJq61y/?ref=app
19th Nov 2021, 1:20 AM
ACE
ACE - avatar
+ 3
Margaret Guzman bro, also notice this. First paramater of the setTimeout or setInterval accept only the function or string. Example: //Recommended setTimeout (functionName, time); Or string setTimeout ("functionName()", time);
19th Nov 2021, 2:36 AM
Kelvin Paul
Kelvin Paul - avatar