files/en-us/web/api/workerglobalscope/clearinterval/index.md
{{APIRef("HTML DOM")}}{{AvailableInWorkers("worker")}}
The clearInterval() method of the {{domxref("WorkerGlobalScope")}} interface cancels a timed, repeating action which was previously established by a call to {{domxref("WorkerGlobalScope.setInterval", "setInterval()")}}. If the parameter provided does not identify a previously established action, this method does nothing.
clearInterval(intervalID)
intervalID
setInterval().It's worth noting that the pool of IDs used by
{{domxref("WorkerGlobalScope.setInterval", "setInterval()")}} and
{{domxref("WorkerGlobalScope.setTimeout", "setTimeout()")}} are shared, which
means you can technically use clearInterval() and
{{domxref("WorkerGlobalScope.clearTimeout", "clearTimeout()")}} interchangeably.
However, for clarity, you should avoid doing so.
None ({{jsxref("undefined")}}).
See {{domxref("Window.setInterval", "setInterval()")}} for examples.
{{Specifications}}
{{Compat}}