Scroll to top of the page


PHOTO EMBED

Mon Jan 25 2021 14:18:40 GMT+0000 (UTC)

Saved by @aymanelya #javascript

const goToTop = () => window.scrollTo(0, 0);
goToTop();
// Result: will scroll the browser to the top of the page
content_copyCOPY

https://radiant-brushlands-42789.herokuapp.com/medium.com/dailyjs/13-javascript-one-liners-thatll-make-you-look-like-a-pro-29a27b6f51cb