Lenskart Solutions interview question

Implement working debouncing in JavaScript