I thought looping through functions would be pretty easy but i’ve been working on it for some time now and haven’t managed to make it work.
What i wanna do is:
- Run function 1
- After 40 secs run function 2
- After 80 secs run function 3
- After 120 secs run function 4
- After 160 secs run function 1 again
- Back to step 2
Maybe i confused you with these steps, what i mean is i wanna run a function and wait 40 secs before running the next.
And basically i want this to go on forever. I’ve tried some stuff with setTimeout and setInterval, maybe i used them in a wrong way, but as i said i didn’t manage to make it work.
Thanks a bunch.