The interval timer mechanism can be used to repeat the execution of a block of script code at regular intervals. You can establish several blocks of repeating code at once if necessary, so there could be a number of pending interval timers. You must be able to identify the one that you want to clear.
When you create an interval timer with the setInterval() method, it will return back to you with a value that corresponds uniquely to that interval's set-up context. You can use that value later to clear the interval timer.
You must be careful not to clear an interval more than once.
Be careful when clearing interval timers. If you try to clear one that does not exist, it can sometimes crash the browser.