Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
Node.js
0/50 solved · 0%
All lessons
lesson
code
Patterns · medium
22. Exponential Backoff Calc
Calculate wait time for retries.
Formula: `base * (2 ** attempt)`. Cap it at `max`.
Required in your answer:
Math.min
Math.pow
Reveal solution
Run & check
Reset
Runs in a sandboxed worker
function getWait(attempt, base, max) { // TODO }
Output appears here.
← 21. RPC Request Batcher
23. Circuit Breaker Logic →