What is the event loop in Node.js? The event loop is the core of Node.js's non-blocking I/O operations. It handles all
synchronous operations in a single thread, constantly checking for events (e.g., incoming
data, timers) and executing associated callbacks.
📌 Example:
setTimeout(() => {
console.log('Executed after 2 seconds');
}, 2000);
This callback is scheduled by the event loop and executed when the time is up.