JSFiddle - React, Tailwind, and code Playground

by Paulpro

JavaScript

var i = 0;
function foobar(){
    setTimeout(function(){ alert(++i); }, 0);
    setTimeout(function(){ alert(--i); }, 0);
}

foobar();
foobar();
foobar();
foobar();
foobar();
alert('This will ALWAYS alert first');