when i click my button, a timer is supposed to display a countdown timer. But the button does not work.
let timerCounter = document.getElementById("timer-counter");
let timer;
let timerCount;
function startTimer (){
timer = setInterval(function(){
timerCount--;
timerElement.textContent = "Time; " + timerCount;
if (timerCount === 0){
clearInterval(timer);
}
});
}
startButton.addEventListener(“click”, startTimer);