Fandom interview question

Implement a debounce function in Js