Write an auto-retry function retry(fn, retries, delay) that retries a promise-returning function with exponential backoff.
Skip to the solution
MediumFrontendAsked in 20241 min read
Promise Retry with Backoff
319 views
The problem
- async
Try it yourself
Sketch your approach before you read the solution. That is what the interview tests.
Stuck? Get a hint.
A short nudge toward the approach. It will not give the answer away.
Solution
The solution is hidden so you can try first
1 min read
Run the code
Edit the code and run it here. Each console line with an expected value becomes a test.
JavaScriptExponential backoff retries
Discussion
Other approaches, follow-ups and how it went in real interviews.
Sign in to join the discussion.
No comments yet. Share how you would answer it.
Question 120 of 154 in JavaScript coding
Keep your momentum going.
Mark this question solved to track your progress, then take the next one while it is fresh.
Up nextMediumβ
Implement difference(a, b) β elements in a not in b
Continue