How to write a countdown timer in JavaScript? [closed]
I have two demos, one with jQuery and one without. Neither use date functions and are about as simple as it gets. Demo with vanilla JavaScript function startTimer(duration, display) { var timer = duration, minutes, seconds; setInterval(function () { minutes = parseInt(timer / 60, 10); seconds = parseInt(timer % 60, 10); minutes = minutes < … Read more