Graded in a sandbox
Test code not shown · 25 min suggested
Implement debounce
A burst of calls becomes the last one.
All required tests passed
How to read this: the verdict comes from the required tests. The counts below describe how the code was written. Nothing here shows who typed it. Iterations are the times the tests were run. Versions are distinct versions of the code the tests ran on. Span is the time from first run to save.
- Required tests
- 5 of 5
- passed
- Bonus
- 2 of 2
- passed
- Iterations
- 1
- graded run
- Versions
- 1
- distinct version graded
- Span
- 13s
- first run to save
- Runtime
- 399 ms
- in the sandbox
- Saved
- Nov 10, 2026
How the code arrived
- Run 1, 0s after the first run: added 593 bytes, passed every required test.
- First graded run
- Already passed every required test.
- Largest single jump
- 593 bytes added between two graded runs, counting from the starter code.
Tests
- PASSdoes not call fn before the wait elapses
- PASScalls fn once after the wait
Questions to ask in the interview
Questions that start with a line number point at the submitted code. The others come from this Challenge and the counts above. Each one asks the candidate to explain the code in their own words.
- Line 18: what would break without this clearTimeout?
- Walk me through why you clear the timer before scheduling a new one.
- What happens to the arguments if the function is called three times inside the wait window?
- How would you add a way to run the pending call immediately?
- If this ran in a search box, what would you change about the wait time, and why?
- Your first graded run passed every required test. Talk me through how you wrote it.
- In one graded step your code grew by about 593 bytes, counting from the starter code. What did you add in that step, and why?