Answers for "repeating countdown timer javascript"

0

repeating countdown timer javascript

var count=25;

var counter=setInterval(timer, 1000); //1000 will  run it every 1 second

function timer()
{
  count=count-1;
  if (count <= 0)
  {
    clearInterval(counter);
    return;
   }

 document.getElementById("timer").innerHTML=count; // watch for spelling
 }
Posted by: Guest on May-28-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language