How to write a non-blocking, delayed for loop in JavaScript without recursion?
I want a for-loop that executes its code every X amount of milliseconds. It should be non-recursive to avoid a stack overflow after many iterations. Also, it should be non-blocking, and its performance should be decent. I tried it with…