node-process-argv Flashcards
1
Q
What is the process object in a Node.js program?
A
The process object in a Node.js program is a global that provides information about, and control over, the current Node.js process.
2
Q
How do you access the process object in a Node.js program?
A
From the directory, type ‘node process’.
3
Q
What is the data type of process.argv in Node.js?
A
An array. More specifically, process.argv returns an array containing the ‘process.execPath’ element, the path to the JavaScript file being executed, and the command line arguments passed when the Node.js process was launched.