---
title: clearInterval
summary: The clearInterval() method cancels a timed, repeating action which was previously established by a call to setInterval(). If the parameter provided does not identify a previously established action, this method does nothing.
url: https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/fn.clearInterval/
---

**Kind:** Function  
**Module:** [globals](https://www.fastly.com/documentation/reference/compute/sdks/javascript/js-compute/globals/)  
**Package:** @fastly/js-compute 4.0.1  
**Source:** https://github.com/fastly/js-compute-runtime/blob/70cf30af4e657879b2d1e7eafab880e39e3a3f7d/types/globals.d.ts#L2171

```javascript
clearInterval(intervalID?: number): void
```

The clearInterval() method cancels a timed, repeating action which was previously established by a call to setInterval(). If the parameter provided does not identify a previously established action, this method does nothing.

**See also**

- [clearInterval on MDN](https://developer.mozilla.org/en-US/docs/Web/API/clearInterval)

**Parameters**

- `intervalID`: `number` (optional) — The identifier of the repeated action you want to cancel. This ID was returned by the corresponding call to setInterval().

**Returns**

`void`
