If I write:
myVar = 123; // note the missing var keyword
is there an object in NodeJs where I can retrieve this variable from?
In a browser this would be:
window.myVar
If I write:
myVar = 123; // note the missing var keyword
is there an object in NodeJs where I can retrieve this variable from?
In a browser this would be:
window.myVar
Node's globals are stored in the global
variable and is documented here. Since "global" variables are local to each module, global
is the true global variable that is shared across modules.