JSFiddle - React, Tailwind, and code Playground
JavaScript
function first(){
setTimeout( function(){
console.log(1);
}, 500 );
}
function second(){
console.log(2);
}
//===================
first();
setTimeout(second, 501);
function first(){
setTimeout( function(){
console.log(1);
}, 500 );
}
function second(){
console.log(2);
}
//===================
first();
setTimeout(second, 501);