codegurukool.com · Free coding tutorials & online compiler

Home › Node.js Tutorial › Node.js process

Node.js process

Arguments and the current folder.

The global process object describes the running program. process.argv lists the command-line arguments and process.cwd returns the current folder.

Example code

console.log(process.argv.length);
console.log(typeof process.cwd());

Run this code in the online editor

← Node.js JSONNode.js NPM and package.json →