Day 5 of learning in public
Today I understood how JS works internally
Key concepts:
• Call Stack
• Event Loop
• Microtask Queue
• Macrotask Queue
Big takeaway
Even setTimeout(fn,0) doesn’t run immediately
Execution order:
Call Stack → Microtask Queue → Macrotask Queue