Languages
[Edit]
EN

Does NodeJS have equivalent to web browser window object?

12 points
Created by:
Root-ssh
175450

In NodeJS there is not available window object equivalent like in web browsers, but there is global object that represents global scope inside module.

Official documentation for global object in Node.js

In browsers, the top-level scope is the global scope. This means that within the browser var something will define a new global variable. 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.

 

Documentation link is here.

 

Alternative titles

  1. Global scope reference in NodeJS
  2. Global scope reference in Node.js
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join