Understanding the Global Object in Javascript


In browsers, window is the global object; in Node.js, global is.

Source Code

console.log(window.document); // Browser's document object
console.log(global.Buffer); // Node.js global Buffer
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments