<div class='container'>
Seconds : <span id='seconds'>15</span>
</div>
let time
function timer() {
time = seconds.innerText
if (time != 0) {
seconds.innerText--
} else {
alert("Время вышло")
clearInterval(interval)
}
}
interval = setInterval(timer, 1000)