Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSasync_hooks execution contextSingle-choice MCQ

What is the output, and why?

const ah = require('async_hooks'); setImmediate(() => { console.log(ah.executionAsyncId()); setTimeout(() => { console.log(ah.executionAsyncId()); setTimeout(() => console.log(ah.executionAsyncId()), 0); }, 0); });