Cancels the timer set by setInterval
.
The timer ID returned by setInterval
.
** Passing in an ID value other than the one returned by setInterval
is undefined behavior and may cause problems. **
setTimeout()
and setInterval()
have a shared pool of ID numbers, so technically clearTimeout()
and clearInterval()
are interchangeable. However, for clarity, you should avoid doing so.