In web browsers, window refers to an object that contains the global variables. This blog post explains how it works and when to use it. The global object and window The ECMAScript specification uses the internal data structure environment to store variables. The language has the somewhat unusual feature of making the environment for global variables accessible as an object, the so-called global o