The pageXOffset property is used to return the pixels a document has scrolled from the upper left corner of the window. This property is equal to the scrollX property. It is a read-only property.
Its syntax is:- window.pageXOffset OR pageXOffset
Its return is:- number of pixels document has scrolled from upper left corner of the window