Back to Developer Roadmap

global keyword

src/data/roadmaps/nodejs/content/[email protected]

4.0758 B
Original Source

global keyword

In browsers, the top-level scope is the global scope, and its global object is called the window object. Within the browser, var something will define a new global variable inside the window object. In Node.js, this is different. The top-level scope is not the global scope; var something inside a Node.js module will be local to that module.

Visit the following resources to learn more: