let count = 0;
const debounce = (func, delay) => {
let timer;
return function(){
clearTimeout(timer);
timer = setTimeout(() => {
func();
}, delay);
}
}
let scrollCount = () => {
console.log(count++);
}
scrollCount = debounce(scrollCount, 500);
window.addEventListener('scroll', scrollCount);
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)