JSFiddle - React, Tailwind, and code Playground

HTML

<!-- NOTICE:
disregard the html below! Its only purpose is
to mirror the "console.log" into the the <pre> element.
I intentionally kept this Javascript seperate from the 
on in the JavaScipt-Fiddle.
-->
<pre id="log"></pre>
<script>
    var old = console.log;
    console.log = function(msg) 
    { 
        var prelog = document.getElementById("log");
        prelog.textContent += msg + "\n";
        old.apply(this,arguments);
    }
</script>

JavaScript

// we setup a "immediate event" (a callback);
window.onresize = function(){ console.log("log resize"); };

// then we run some code which contains a blocking alert
console.log("log A");
console.log("log B");
alert("alert");
console.log("log C");