Deno Mongo Tutorial - MongoDB for Deno
- 03/06/20
- Tutorial
- 2083
The following steps are involved in processing command line arguments:The user inputs a text string.The shell parses the string into a sequence of words and operators.If a command is called, it gets zero or more words as arguments.Our Node.js code receives the words via an Array stored in process.argv. process is a global variable on Node.js.We use parseArgs() to turn that Array into something that is more convenient to work with.Let’s use the following shell script args.mjs with Node.js code to see what process.argv looks like:.