In NodeJS there is not equivalent of
window like in browsers but there is
global object that represents global scope inside module.
1. Official documentation for
global object in NodeJS
In browsers, the top-level scope is the global scope. This means that within the browser
var somethingwill define a new global variable. In Node.js this is different. The top-level scope is not the global scope;
var somethinginside a Node.js module will be local to that module.
Documentation link is here.