What is the event loop?
Model answer
The event loop is how Node handles many tasks on one thread. It runs your synchronous code first, then repeatedly checks queues: timers, I/O callbacks, and others, and runs ready callbacks. Promise callbacks (microtasks) run before the next phase. Blocking the thread with heavy synchronous work freezes everything, so keep handlers short.
Learn this topic
What Is Node.js? Install It and Run Your First Script in the course Node.js and Express: Build a Back End API from Scratch.
Sign in to add your own answer.