Write a debounce function. It takes another function and a delay in milliseconds and returns a new function that calls the original only once that delay has passed since the last call.
~15 min by voice
How to approach it
They're checking your understanding of closures and timers: whether you can return a wrapper function, keep state (timerId) in a closure, and reset the timer correctly so the original function fires once at the end of a series of calls, with the right arguments and this.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.