Misafir adlı üyeden alıntı: mesajı görüntüle
 var limit = 200;
        const buddy = () => {
            console.log('buddy')
        }
        var control = false;
        window.onscroll = () => {
            if (window.scrollY >= limit) {
                if (control == false) {
                    buddy();
                }
                control = true;
            } else {
                control = false;
            }
        }
Addeventlistener kullanmak daha iyi olur sanki