The clearInterval method of the window object is used to stop a time interval based function from running. setInterval() initiates the timed functionality, while clearInterval() stops it from further processing.
interval
The identifier that represents the setInterval() that you wish to target.
TIP: You can choose to not apply the reference for the "window" object since it is implied if not specified. window.clearInterval(myInterval); works the same as clearInterval(myInterval);
Related Material
setTimeout()
clearTimeout()