JS if timer reaches 0 add +7 days

If the timer reaches 0 how to add +7 days instead of writing “end of timer”

<script>
var endDate = new Date("Jan 25, 2020 12:00:00").getTime();
var timer = setInterval(function () {
let now = new Date().getTime();
let t = endDate - now;
if (t >= 0) {
document.getElementById("remainder").innerHTML =
Math.floor(t / (1000 * 60 * 60 * 24)) + "DAY(S) " +
("0" + Math.floor((t % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).slice(-2) + "HR(S) " +
("0" + Math.floor((t % (1000 * 60 * 60)) / (1000 * 60))).slice(-2) + "MIN(S) " +
("0" + Math.floor((t % (1000 * 60)) / 1000)).slice(-2) + "SEC(S)";
} else {
document.getElementById("remainder").innerHTML = "End of timer.";
}

}, 1000);
</script>

By adding a conditional function to it
Like if timer reach 0 add 7
you can even do it using a double while loop
of course there are many other ways to solve this

Look into the addDays method on the Date object. You would end up adding the 5 days to endDate. Also, you would move the whole document.getElementById("remainder").innerHTML = Math.floor...... to be after the if statement, get rid of the else block. Then, you would just change the if statement condition to be if (t < 0) { and change the endDate to have the extra 5 days added to it.