JSFiddle - React, Tailwind, and code Playground

by oceog

HTML

<div id="test">test</div>

JavaScript

function test() {
    var start = new Date()
    document.getElementById('test').innerText = Math.random();
    while (new Date - start < 5000) {}
}

setTimeout(test,0);