Pergunta de entrevista da empresa Duco

I was asked to code a debounce function