Advanced JavaScript
Q96 / 100

What is the AsyncLocalStorage API in Node.js?

Correct! Well done.

Incorrect.

The correct answer is B) A Node.js API providing per-request context propagation similar to thread-local storage, using AsyncLocalStorage and AsyncResource

B

Correct Answer

A Node.js API providing per-request context propagation similar to thread-local storage, using AsyncLocalStorage and AsyncResource

Explanation

asyncLocalStorage.run({ requestId }, () => handler()) propagates requestId through all async continuations within that run, enabling request-scoped logging without prop drilling.

Progress
96/100