i =0; i <= height; i += 10) {
window.scrollTo(0, i);
await new Promise(resolve => setTimeout(resolve, 1));
}
any idea why?
The error message also tels you the position of the syntax erroe
I think I'd use requestAnimationFrame if you're trying to animate something (scrolling).
I am soory I am not familiar with js. thanks for the advise I will check that
Well as a beginner, I think it's okay! It's great you're learning :D
Обсуждают сегодня