Is it OK to call clearInterval inside a setInterval handler?

It’s safe. The issue is probably to do with stopTimer not being set as you expect.

Leave a Comment