I recently discovered `AbortSignal.timeout(3000)`. When combined with the fetch API, it is such a nice method for implementing request timeouts compared to racing two Promises. Easier to write and to understand. developer.mozilla.org/en-US/docs/W...
AbortSignal: timeout() static method - Web APIs | MDN
The AbortSignal.timeout() static method returns an AbortSignal that will automatically abort after a specified time.
developer.mozilla.org