JS Built-ins
AbortControllerbeginner

AbortController β€” abort() sets signal.aborted to true

πŸ“– Usage Example
const ac = new AbortController()
ac.abort()
ac.signal.aborted  // β†’ true

abort() signals cancellation to anything listening to the controller's signal.

AbortController.abort()

Calling abort() on the controller sets signal.aborted to true.

Challenge: Create a controller, call abort(), and verify signal.aborted is true.

πŸ’‘ Hints (1)
  • β€’ abort() transitions the signal from not-aborted to aborted permanently