JavaScript clearTimeout() & clearInterval() Method (original) (raw)

Last Updated : 11 Jul, 2025

In JavaScript there are many inbuilt functions clearTimeout() and clearInterval() methods are some of them. when we use setTimeout() and setInterval() in any JavaScript program then it must clear the time used in those functions so we use the clearTimeout() and clearInterval() methods.

Prerequisite:

setTimeout() and setInterval()

**JavaScript clearTimeout() **Function

The clearTimeout() function in javascript clears the timeout which has been set by the ****setTimeout()**function before that.

**Syntax:

clearTimeout(name_of_setTimeout);

**Parameters:

**Example: In this example, we will write a function to clear the timeout set by the setTimeout() function using the clearTimeout() function.

HTML `

Document GeeksForGeeks Stop