Globals
Like the Browser, Node.js comes with some practical globals for us to use in our applications.
Common
globalThink of this as likewindowbut for Node.js. DON'T ABUSE IT!__dirnameThis global is aStringvalue that points the the directory name of the file it's used in.__filenameLike__dirname, it too is relative to the file it's written in. AStringvalue that points the the file name.processA swiss army knife global. AnObjectthat contains all the context you need about the current program being executed. Things from env vars, to what machine you're on.exportsmodulerequireThese globals are used for creating and exposing modules throughout your app. We'll get to modules in a second 🌈
The rest
Depending on what version on Node.js you're running, there are so many more globals. Not as many as the Browser, but enough that you'll probably never use many of them. Check them out here.