JSFiddle - React, Tailwind, and code Playground

HTML

First: <span id="first"></span>
<br/> Then: <span id="second"></span>
<br/> And then: <span id="third"></span>
<br/> And then: <span id="fourth"></span>
<br/> And then: <span id="fifth"></span>

JavaScript

$(document).ready(function() {
  doStuff();
});

function doStuff() {
  $("#first").text(new Date().getSeconds());
  var i = 1;
  
  setTimeout(function() {
    while (i < 1000000000) {
      i++;
    }
    $("#second").text(new Date().getSeconds());
  }, 0);
}