1. let distance = 50;
    2. function go(){
    3. var scrollHeight = document.body.clientHeight;
    4. setTimeout(()=>{
    5. window.scrollTo(0,distance);
    6. distance+=50;
    7. console.log(distance)
    8. if(distance<scrollHeight){
    9. go()
    10. }
    11. },100)
    12. }