Microsoft interview question

Implement a debounce function with javascript