JSFiddle - React, Tailwind, and code Playground

by heuristocrat

HTML

<button id="run">run</button>
<div id="result"></div>

CSS

div {
    font-size: 100px;
}

JavaScript

$('#run').click(function() {
    var start = new Date();
    setTimeout(function() {
        var end = new Date();
        $('#result').html('Time elapsed: ' + (end - start) + 'ms');
    }, 500);
    while (new Date() - start < 1000) {}
});