Question 4 of 10Pro Only
Explain the difference between debounce and throttle, and give examples of use cases for each.
Sample answer preview
Debounce and throttle are two techniques for limiting function execution frequency, but with different behaviors. Debounce works as a waiting period. It waits until the user stops acting for a certain delay before executing the function. Each new action resets the timer.
debouncethrottlelodashsetTimeoutperformanceevent handling