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

Given this code, why does 'immediate' print before 'timeout' here, even though both delays are effectively zero?

setTimeout(() => console.log('timeout'), 0); setImmediate(() => console.log('immediate'));