JSFiddle - React, Tailwind, and code Playground

by briguy37

HTML

<div>Alert1: </div>  <div id="alert1">waiting...</div>
<br/>
<div>Alert2: </div>  <div id="alert2">waiting...</div>
<br/>
<div>Alert3: </div>  <div id="alert3">waiting...</div>
<br/>
<div>Set Timeout: </div>  <div id="setTimeout">waiting...</div>
<br/>

CSS

div {
    float: left;
}

JavaScript

$('#alert1').html('queued');
alert('1');
$('#alert1').html('finished');
$('#setTimeout').html('queued');
setTimeout(function(){
    $('#alert2').html('queued');
    alert('2');
    $('#alert2').html('finished');
}, 10);
$('#setTimeout').html('finished');
$('#alert3').html('queued');
alert('3');
$('#alert3').html('finished');