clearTimeout() can be used to cancel a timeout previously created using the
In the example given below,
the timeout is cancelled before
the time delay has elapsed.
Hence, the function passed to
setTimeout() method is never run
the message is not displayed.
If we remove the
then the function is run normally after a delay of 3 seconds.
As can be seen from the example given above,
clearTimeout() method takes only one parameter: the identifier value returned when calling the