What does Node.js add to the global scope that a browser does not provide?
Node is built on the V8 engine, and it adds a set of globals that only make sense on a machine with a filesystem, a process list, and a network connection. The most important ones are process, which describes the running program, Buffer, which is used for raw bytes, and global, which is the name Node gives to the global object. Node also adds setImmediate, which schedules work to run after the current round of the event loop, and it gives you the standard library modules through require rather than through more globals.
console.log(typeof process); // object
console.log(typeof Buffer); // function
console.log(typeof global); // object
console.log(typeof setImmediate); // function
console.log(process.platform); // linux, win32, darwin
console.log(process.cwd()); // the folder the script was started from
console.log(process.pid); // the process idThe browser has its own set of extras instead. It provides window, document, navigator, location, history, localStorage, and the fetch APIs. Neither environment is a bigger version of the other, and that is exactly why portable code should not depend on either one.
One detail is worth getting right. In Node, global is the global object, and globalThis is the newer standard name that works in both environments. If your code has to reach the global scope, prefer globalThis, because it behaves the same in a browser, in Node, and inside a web worker.
There is one more practical point. The fact that Node can read files and open network connections is a security decision and not a technical one. Browser code runs inside a sandbox that deliberately forbids direct access to the machine, which is why a web page has to ask the user to pick a file instead of simply opening one.