JSFiddle - React, Tailwind, and code Playground
by dingjing
HTML
<div id="log"></id>
JavaScript
var log = function(content){
$('<p/>').html(content).appendTo('#log');
}
function doStep(i){
setTimeout(function(){
log("Step " + ++i + " finished.");
}, Math.random()*1000);
}
$(function(){
var i;
for(i = 0; i < 5; i++){
doStep(i);
}
log("All steps done.");
});