This is discussed in the following stackoverflow clue:
An attribute of the window global object, which contains the size information of the physical screen.
window.screen or just screen is a small information object about physical screen dimensions.
window.document or just document is the main object of the potentially visible (or better yet: rendered) document object model/DOM.
The DOM object corresponding to the visible part of the rendered page.
Is a child node named body in the document object described above.
Since window is the global object you can reference any properties of it with just the property name – so you do not have to write down window. – it will be figured out by the runtime.
Because window is a global object, when accessing its properties, the writing of window. Can be omitted.
Therefore, it is also effective to access the properties in the window in the following ways:
More of Jerry’s original articles are: “Wang Zixi”: