loading...
markdown guide
 

The issue you may be running into is that both scroll and scrollTo take an x-coord and a y-coord independently, not an Array.

window.scrollTo([0,100]); // bad

window.scrollTo(0, 100); // good
window.scrollTo(...[0,100]); // good
 

Nice, I tried to figure this out but I got caught up in the syntax, too.

 
Classic DEV Post from Apr 25 '19

Form habits by making the right thing easiest

Tools should always work for you, not against you! Invest some time making sure you configure them to adapt to shifting conditions.

Shunsuke Nishino profile image