JSFiddle - React, Tailwind, and code Playground

by Andrea Scanu

HTML

<div id="response"></div>

JavaScript

function tick(i) {
        return function() {
            $.post('/echo/html/', {html:('Response to '+ i)}, 
            function(data){
                $('#response').append(data+'<br>');        
            });
        }
    }
for (var i = 0; i = 5; i++) {
    setTimeout(tick(i), 2000 * i);
}