buffer is one of Node’s global objects. Another global object is
global itself, though the global object in Node is fundamentally different than the global object we’re used to in the browser. Node developers also have access to another global object,
process, which provides a bridge between the Node application and its environment.
Thankfully, one aspect of Node should be familiar to frontend developers, and that’s its event-driven asynchronous nature. The difference in Node is that we’re waiting for files to open rather than for users to click a button.
Event-driven also means those old friends, the timer functions, are available in Node.
Two fundamental objects in Node are the
process objects. The
global object is somewhat similar to ...