JSFiddle - React, Tailwind, and code Playground
HTML
<span id="console"></span>
JavaScript
function a() {
i = 0
while (i < 1000000000) {
i++;
}
document.getElementById("console").innerHTML += "in a()<br />";
}
function b() {
document.getElementById("console").innerHTML += "came here";
}
a();
b();
// b is called after completing a's execution