code: function tick() {
          currentTime += 1 / 60;
          var p = currentTime / time;
          var t = easingEquations[easing](p);
  
          if (p < 1) {
              requestAnimationFrame(tick);
  
              window.scrollTo(0, scrollY + ((scrollTargetY - scrollY) * t));
          } else {
              window.scrollTo(0, scrollTargetY);
          }
      }
docs: add animation loop