JSFiddle - React, Tailwind, and code Playground
HTML
<pre id="res"></pre>
JavaScript
function x(){
res.innerHTML += "function x called\n";
res.innerHTML += "Letting setTimeout call y asynchronousely\n";
setTimeout(function y(){
res.innerHTML += "function y called\n";
},0);
res.innerHTML += "returning from x\n";
}
res.innerHTML += "Calling x\n";
x();