stopinterval js code example
Example 1: stop a setinterval
let myVar = setInterval(() => {console.log('bop'), 1000);
clearInterval(myVar);
Example 2: stop interval js
clearInterval(interval)
Example 3: settimeout function
setTimeout(function(){
$('#overlay'). modal('hide')
}, 5000);
//#overlay will be the ID of modal which you want to hide or show modal
Example 4: stop window.setinterval javascript
window.clearTimeout(yourTimer)