Note the node event loop is not dissimilar to the event loop in the browser. There's a great talk explaining
the browser event loop, tasks, microtasks, etc and how they're scheduled with CSS, Animations the DOM in this talk from Jake Archibald at 2018 JSConf Asia: https://www.youtube.com/watch?v=cCOL7MC4Pl0