Engrain by ByteRush

JS.14.03 Mid-levelCore — asked often

throttle (leading/trailing)

Comes up in: Coding, UI coding

This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.

What it covers

  • timestamp vs timer throttle
  • trailing call with latest args
  • difference from debounce with a timeline diagram
  • rAF throttling for scroll

Words you will know

throttlerate limiting

What you will practise

  • implement
  • choose debounce vs throttle for 6 scenarios

Interview questions this answers

  • Implement throttle. How is it different from debounce?