Global objects are those who provide variables and functions that are available anywhere within the code. By default, they are those objects which are built into the language or the environment.

All the properties of Global Objects can be accessed directly in node.js using the window.

BY Best Interview Question ON 04 Nov 2020

Example

window.currentUser = {
    name: "Best Interview Question"
};