Confluence interview question

Implement the debounce function from scratch