Advanced JavaScript
Q64 / 100

What is the difference between AbortController and CancellationToken?

Correct! Well done.

Incorrect.

The correct answer is B) AbortController is the browser/Node.js native cancellation primitive; CancellationToken is a C# concept but inspired AbortSignal patterns

B

Correct Answer

AbortController is the browser/Node.js native cancellation primitive; CancellationToken is a C# concept but inspired AbortSignal patterns

Explanation

AbortController.signal is passed to fetch/streams/EventListeners. Calling controller.abort() cancels the operation. It is now available in Node.js as well.

Progress
64/100