<p id="countdown">00:00</p>
let time = 3000;
const countDownEl = document.getElementById('countdown')
setInterval(updateCountdown, 1000)
function updateCountdown() {
const minutes = Math.floor(time / 60);
let seconds = time % 60;
seconds = seconds < 10 ? "0" + seconds : seconds;
countDownEl.innerHTML = `${minutes}:${seconds}`;
time--;
}