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);
javascript clear interval
javascript by Mysterious Monkey
on Feb 10 2021 Comment
8