One interesting property of setInterval is that there's no guarantee your code will run. For example, the minimal actual resolution in most browsers will be around 17ms, roughly the time an animation frame needs. While you can request smaller values, don't expect your callback to run more often. Also, when a page's tab is in the background, intervals might get suspended and resumed once the page is back in focus.
One interesting property of setInterval is that there's no guarantee your code will run. For example, the minimal actual resolution in most browsers will be around 17ms, roughly the time an animation frame needs. While you can request smaller values, don't expect your callback to run more often. Also, when a page's tab is in the background, intervals might get suspended and resumed once the page is back in focus.
Oh that's interesting, wan't aware of that actually 👀