AbortController gives you a signal you can pass to fetch (and many other APIs) to cancel an in-flight request. controller.abort() rejects the fetch promise with an AbortError.
The classic use case is search-as-you-type: cancel the previous request as soon as the user types another character. Without this you race against your own keystrokes and the latest UI can be overwritten by an older response.
AbortSignal.timeout(ms) gives you a one-liner timeout signal — handy in Node 20 and modern browsers.