Wix interview question

Implement debounce function in js