how to stop interval in js code example
Example 1: stop a setinterval
let myVar = setInterval(() => {console.log('bop'), 1000);
clearInterval(myVar);
Example 2: setinterval break
var refreshIntervalId = setInterval(fname, 10000);
/* later */
clearInterval(refreshIntervalId);
Example 3: stop window.setinterval javascript
window.clearTimeout(yourTimer)