Skip to main content

What is Debouncing and Throttling?

Mid JavaScript
Quick Answer Debouncing: delay execution until after a quiet period รขโ‚ฌโ€ a search input only fires after the user stops typing for 300ms. Throttling: execute at most once per time interval รขโ‚ฌโ€ a scroll handler fires at most every 100ms. Debouncing collapses bursts into one call at the end; throttling limits the rate. Both prevent performance-killing event handler spam.

Answer

Debouncing: Trigger function after a delay of inactivity.

Throttling: Trigger function at fixed intervals.

Useful for scroll, resize, and search inputs.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice