WorkerGlobalScope: clearInterval() method - Web APIs | MDN

Syntax

js

clearInterval(intervalID)

Parameters

intervalID

The identifier of the repeated action you want to cancel. This ID was returned by the corresponding call to setInterval().

It's worth noting that the pool of IDs used by setInterval() and setTimeout() are shared, which means you can technically use clearInterval() and clearTimeout() interchangeably. However, for clarity, you should avoid doing so.

Return value

None (undefined).

Examples

See setInterval() for examples.

Specifications

Specification
HTML
# dom-clearinterval-dev

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.