JSFiddle - React, Tailwind, and code Playground

HTML

<div>
  Timer: <span id=timer></span>
</div>

JavaScript

function startTimer(secs) {
  var timer = document.getElementById('timer');
  setTimeout(function() {
      timer.innerHTML = 'Done!';
  }, secs * 1000);
}

startTimer(10);