AbortController: how to cancel a fetch request in JavaScript

Learn how to cancel fetch requests in JavaScript with AbortController, handle AbortError, set timeouts, and abort on unmount or superseded requests.