I have a counter function I got it from this Answer :
function countDown(i) {
var int = setInterval(function () {
document.querySelector(".count").innerHTML = "Number: " + i;
i-- || clearInterval(int); //if i is 0, then stop the interval
}, 1000);
}
countDown(60);
So when it finishes counting it stops at 0;
What I'm trying to achieve when the counter stops at zero I want to reset the function to count down from 60 to 0.
Is it possible to reset the function? I'm really lost at this point