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

At the very top level of a Node script, async_hooks.executionAsyncId() returns 1 and triggerAsyncId() returns 0. What do these two specific values represent in the async-resource model?

const ah = require('async_hooks'); console.log(ah.executionAsyncId(), ah.triggerAsyncId());