documentElement returns the root element of the document. We need it to get the offset values. So, next let's save it in a variable called rootElement — that way it's easier to call in the code. Then, inside the scrollToTop function, we will make it scroll to the top of the screen with the scrollTo method