As the name denotes, these are the global object reference that can be accessible in all modules of Node JS. Some of the global objects are.

  • process
  • console
  • require()
  • __dirname
  • __filename
  • setTimeOut(callback)
  • setImmediate(callback)
  • setInterval(callback)

These objects are available in all modules. The following variables may appear to be global but are not. They exist only in the scope of modules.

  • __dirname
  • __filename
  • exports
  • module
  • require()