JSFiddle - React, Tailwind, and code Playground
HTML
<script>
</script>
<div>
Registration closes in <span id="timer">(60)<span>
</div>
JavaScript
window.onload = function(){
var sec = 60;
}
function resetTimer()
{
var sec=60;
setInterval(function(){
document.getElementById("timer").innerHTML = '('+sec+')' ;
sec--;
if(sec == 00)
{
sec = 60;
}
},1000);
}