Process
process.argv
Array of arguments for the current process. In ordinary file invocation, the first two positions are the executable and script path; later entries are user arguments.
Formal Syntax & Structure
nodejs syntaxnodejs
process.argvReturn Value
string[]
Argument strings.
Working Example
Example Snippetnodejs
console.log(JSON.stringify(process.argv.slice(2)));