Node.js · Junior · Question 49 of 75
What does process.argv contain?
- 1Only the arguments passed by the user
- 2Environment variables
- ✓Correct answer: The command-line arguments: the path to
node, the path to the script, then the user's arguments
Explanation
User arguments start at process.argv[2]. For parsing flags you can use the built-in util.parseArgs.