DEV Community

Deepanshu Chhikara
Deepanshu Chhikara

Posted on

Struggling with JavaScript loops! When I try restarting i in a for or while loop with setTimeout, things go wrong. The for loop doesn’t restart as expected. Any tips on managing loop resets without breaking logic?

Top comments (0)