JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" id="cds" />

JavaScript

countdown(100);

function countdown(integer) {
   var time = setInterval(function(){
            document.getElementById("cds").value="->"+(integer--)+"<-"
                if (integer == 0) clearInterval(time);
                },1000);
}