100 Days of Nodejs challenges

Day 2 - Global Objects

Goals

  • Understand and explore Node.js global objects
  • Learn how to use these global objects effectively in your Node.js applications

Tasks

1. Global Objects

  • __dirname: The directory name of the current module
  • __filename: The file name of the current module
  • process: Information about the current Node.js process

2. Understanding 'process' Object

  • process.env: Access environment variables.
  • process.argv: Command line arguments.
  • process.exit(): Exiting the current process
  • process.cwd(): Current working directory
  • process.memoryUsage(): Memory usage of the Node.js process.

      Community|Blog|Logic Puzzles|Careers|Contact Us
      Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
      100DaysOfCode@2024