Glossary term
What is window? Meaning for developers
window stands for Global object (window in browsers, globalThis everywhere).
The object the engine creates alongside the global execution context. Top-level var and function declarations become its properties; at top level, this points to it.
Learn it properly · JavaScript CoreLesson 5: Window and Global ThisEven a completely empty JS file isn't really empty — the engine still builds a global object and points a keyword called this straight at it. Here's exactly what gets built, what it's called in different places, and the one rule that quietly changes depending on strict mode.