JS Built-ins
AbortControllerintermediate

AbortController β€” signal.aborted stays true after multiple aborts

πŸ“– Usage Example
const ac = new AbortController()
ac.signal.addEventListener('abort', () => console.log('aborted!'))
ac.abort()  // β†’ logs 'aborted!'

Listen to the 'abort' event on signal to react when cancellation occurs.

AbortController multiple abort calls

signal.aborted remains true even if abort() is called multiple times.

Challenge: Call abort() twice and verify signal.aborted is still true.

πŸ’‘ Hints (1)
  • β€’ abort() is idempotent: calling it multiple times does not change the already-aborted state