Upstream Security interview question

Implement Debounce function in JS