JavaScript Utilities

Implement Debounce

easyJS SpecificJS / TS4 tests

Problem Statement

Implement a `debounce` function that delays invoking `fn` until after `delay` milliseconds have elapsed since the last time the debounced function was invoked.

Examples

Example:
const log = debounce(() => console.log('Fired!'), 300);
log(); log(); log(); // Only prints once after 300ms of inactivity
JavaScript & TypeScript starter code included
Run this as a live interview

Practice solo

4 test cases. No second person needed.

Get new interview exercises

Practice problems and review drills, sent when we publish new ones. No spam.

Unsubscribe anytime. We never share your address.