Here is the pen
How can I prevent the browser from freezing when looping with setTimeout()?
Maybe limit the times it loops?
Here is the pen
How can I prevent the browser from freezing when looping with setTimeout()?
Maybe limit the times it loops?
Solved it. The callback inside the setTimeout shouldn’t have parentheses. I got the solution from here.
Glad you solved it and thanks for posting the answer - it may help others in future.
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.