employer cover photo
employer logo

Datorama Interview Question

Implement debounce function

Interview Answer

Anonymous

Apr 19, 2020

function debounce (fn, wait) { let t return function () { clearTimeout(t) t = setTimeout[() => fn.apply(this, arguments), wait) } }