I was making a Timer with Javascript, until I came across a problem. While counting the seconds, I saw that the seconds would not reset to 0 every minute. Here is my code:
let sec = 0;
let double = -0;
let meme = setInterval(function() {
document.open();
document.write(double + "Min" + " " + sec + "Sec");
sec++;
}, 1000);
setInterval(function() {
document.write(double);
double++;
}, 61000);
setInterval(function() {
document.open();
}, 60999);
Is there any way to reset the seconds after 60 intervals?