Javascript - setInterval ()

I am making a game using Javascript and I use setInterval () to update the game. Should I use clearInterval () somehow on the output of the window, or does it automatically stop?

+5
source share
1 answer

The browser (or better: should be) smart enough to completely clear a closed website. This includes interrupting the execution of running connections and shutting down scripts. The data that remains on your PC after closing the tab usually includes only items such as browser history entries, cookies, local storage and cached data (for example, scripts, style sheets, images).

+6
source

All Articles