Skip to main content

clearInterval

function clearInterval
Jump to headingclearInterval(id?: number): void

Cancels a timed, repeating action which was previously started by a call to setInterval()

const id = setInterval(() => {console.log('hello');}, 500);
// ...
clearInterval(id);

Parameters Jump to heading

optional
Jump to headingid: number

Return Type Jump to heading

void
Back to top