Find the bug before running it.
function debounce(fn, delay) {
let timer;
return function (...args) {
clearTimeout(delay);
timer = setTimeout(() => fn.apply(this, args), delay);
};
}
Reply with what is broken and how you would fix it.
MechaPrime