javascript clearinterval

JavaScript
 var myVar = setInterval(myTimer, 1000);

function myTimer()
 {
  var d = new Date();
  var t = d.toLocaleTimeString();

   document.getElementById("demo").innerHTML = t;
}

function myStopFunction()
 {
  clearInterval(myVar); // stops interval
}
 var interval = setInterval(function() {
  console.log("Hello World");
}, 1000);

function stopInterval() {
	clearInterval(interval);
}var myInterval = setInterval(function(){console.log("mmk")}, 2000);

clearInterval(myInterval); //stop that intervalsetIntervallet myVar = setInterval(() => {console.log('bop'), 1000);

clearInterval(myVar);
Source

Also in JavaScript: