AniUI Academy
medium+250 XPFrontend AlgoArena

Implement Throttle Rate Limiter

Throttling guarantees execution at steady intervals (e.g. scroll handlers). Implement throttle(fn, wait).

What it has to do

  • Execute fn immediately on first call.
  • Ignore subsequent calls made within wait milliseconds.

Your workspace

Try it yourself
Loading playground...

Ready to check it?

1 tests run against your code, right here in your browser. Sign in to claim the XP when you pass.

AI Crack & Solution Assist

Stuck? Get instant AI hints or break down the optimal solution.