For web browsers, we have a window object. It provides the “browser window” functionality, and also play the role of a global object. In those web browsers, when scripts create global variables, they’re created as members of the global object(window object). In Node.js, This is not the case.

#javascript #node.js #javascript modules #js #nodejs

Node.js - Knowing the Global Objects
1.25 GEEK