JSFiddle - React, Tailwind, and code Playground

HTML

<div id="countdown"></div>

CSS

#countdown{
        
    font-size:5em ;
}

JavaScript

var count=0;
var ms = 20;
var step = 10;
var counter=setTimeout(timer, ms); //1000 will  run it every 1 second

function timer()
{
  count=count+1;
  if (count <= 124)
  {
    //Do code for showing the number of seconds here
     document.getElementById("countdown").innerHTML=count ; // watch for spelling
     ms = ms + step;
     counter = setTimeout(timer, ms);

  }

}