Skip to main content

clearInterval()

clearInterval() stops a repeating callback that was started with the setInterval() method.

Signature

clearInterval(id: string)

Parameters

id

The string name of the timer that you want to clear. This should match the id parameter of the setInterval() call that you want to stop.

Example: If you want to clear a timer whose id is myTimer, refer to the code snippet given below:

clearInterval("myTimer");

See also

setInterval()
setTimeout()