Back|
frontendImplement Debounce
mediumwrite5m

Implement Debounce

0:00

Implement a `debounce` function that takes a function and a delay in milliseconds, and returns a debounced version of that function. The debounced function should only execute after the specified delay has passed since the last call.

constraints: Must use setTimeout/clearTimeout · Must properly handle rapid successive calls · The debounced function should pass through arguments to the original function · No external libraries allowed