JavaScript Stop setInterval
var myInterval = setInterval(function(){console.log("mmk")}, 2000);
clearInterval(myInterval); //stop that interval
Grepper
var myInterval = setInterval(function(){console.log("mmk")}, 2000);
clearInterval(myInterval); //stop that interval
let myVar = setInterval(() => {console.log('bop'), 1000);
clearInterval(myVar);
window.clearTimeout(yourTimer)
var refreshIntervalId = setInterval(fname, 10000);
/* later */
clearInterval(refreshIntervalId);
// See the docs for setInterval() and clearInterval()