Variable pageYOffset

    pageYOffset: number

    This is a legacy alias of scrollY.

    MDN Reference