Scroll event in JavaScript

There is the scroll event that can be used to catch the moment when the user is scrolling the window. Let's try it:

javascriptwindow.addEventListener('scroll', function() {
  console.log('!');
});

We will display the current scroll from the top of the site:

javascriptwindow.addEventListener('scroll', function() {
  console.log(window.pageYOffset);
});
Задание 1

When you scroll to the bottom of the page, display a message about it.