changing the date on a countdown when distance is < 0

I have a timer to count down to a date and time.
What i’d like it to do is that after it hits 0 with the first date, it would then start counting down to the next date.

I am not at all good at code so there might be the most simple answer to this but i have not been able to find it.

here’s what i got. So i tried making an If statement but i couldnt find what actually would tell it to do what i want it to.

`
function countDown() {
var countDownDate = new Date(“feb 10, 2024 23:24:00”).getTime();

var x = setInterval(function() {

var now = new Date().getTime();
var distance = countDownDate - now;

var h = Math.floor(distance / (1000 * 60 * 60 ));
var m = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var s = Math.floor((distance % (1000 * 60)) / 1000);
h = addZero(h);
m = addZero(m);
s = addZero(s);
document.getElementById("timer").innerHTML = h + ":" + m + ":" + s ;


}, 1000);

function addZero(i) {
if (i < 10) {i = "0" + i};  
return i;
}

}

`