DEV Community

Discussion on: Understanding the Node.js event loop phases and how it executes the JavaScript code.

 
lunaticmonk profile image
Sumedh Nimkarde

Hey! Pardon for the late reply. As trunghahaha said, process.nextTick is wrapped inside the fs.readFile, hence, the event loop gets to know about it only when the callback of fs.readFile is executed, right? Hence, such behaviour.