Microtasks vs Macrotasks Madness: Understanding the JS Event Loop
The Confusing JS Snippet That Makes Everyone Say 🤯
Alright, let’s kick things off with a tiny piece of JavaScript that has made even experienced devs scratch their heads.
console.log("A");
setTimeout(() => console.log("B"), 0);
Promise.resolve().the...
micro-vs-macro-madness.hashnode.dev5 min read