Practice ยท 2 of 3
Abortable Delay
Write abortableDelay(ms, signal) returning a promise that resolves with "done" after ms โ UNLESS signal aborts first, in which case it must REJECT with an error whose name is "AbortError". If the signal is already aborted, reject immediately.
Difficulty: intermediate
Press Submit to check your solution.
Back to lesson: Practice: Cancellation โ Practice