Using setTimeout() it is possible to launch a function at a specified time:
setTimeout()
setTimeout(function, 60000);
But what if I would l
A good example where to subscribe a setInterval(), and use a clearInterval() to stop the forever loop:
function myTimer() { } var timer = setInterval(myTimer, 5000);
call this line to stop the loop:
clearInterval(timer);