Practice ยท 2 of 3
Abortable Delay
CHALLENGE
Difficulty: intermediate+25 XP
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.
Press Submit to check your solution.
Back to lesson: Practice: Cancellation โ Practice