Write a retry function. It takes an async function and options: the number of attempts, a base delay, and an AbortSignal. It calls the function and, on error, retries it with an exponentially growing delay. It returns a promise with the first successful result or the last error.
~15 min by voice
How to approach it
They're checking whether you can write a reliable, production-grade async utility. What matters is a correct attempt loop, exponential backoff with jitter and a cap, honest cancellation via AbortSignal without leaking timers and listeners, filtering out non-retryable errors, and the ability to clarify requirements and explain your plan before writing code.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.