Похожие чаты

Evaluating this code leads to SyntaxError: Unexpected identifier for (let

i =0; i <= height; i += 10) {
window.scrollTo(0, i);
await new Promise(resolve => setTimeout(resolve, 1));
}

any idea why?

6 ответов

19 просмотров

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).

// AlenPaulVarghese //- Автор вопроса
Banana
I think I'd use requestAnimationFrame if you're tr...

I am soory I am not familiar with js. thanks for the advise I will check that

// AlenPaulVarghese //
I am soory I am not familiar with js. thanks for t...

Well as a beginner, I think it's okay! It's great you're learning :D

Похожие вопросы

Обсуждают сегодня

Карта сайта