GitHub 6248★

Scroll to top of the page

JavaScript version

const goToTop = () => window.scrollTo(0, 0);

TypeScript version

const goToTop = (): void => window.scrollTo(0, 0);
Follow me on and to get more useful contents.