Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSevent loop phasesSingle-choice MCQ

What does this program print, and why does the ordering hold regardless of machine speed?

const fs = require('fs'); fs.readFile(__filename, () => { setTimeout(() => console.log('timeout'), 0); setImmediate(() => console.log('immediate')); });