In this video, learn
How do I pass command line arguments to a Node.js program?
or
How to parse command line arguments Node Js
process.argv
In Node.js,
all command-line arguments
received by the shell
are given to the process in an array
called argv ('argument values').
Node.js exposes this array
in the form of 'process.argv'
The first two items in process.argv are:
1,The path to the executable running the JavaScript file
2,The path of the JavaScript file being executed.
So the first command line argument is the third item in the array.
-----------------------------------------------------------------------------------------------------
TypeError: console is not a function
at /home/winner/Documents/nodejs/cmdlArgs/mainapp.js:6:5
if you have any queries pls comment the same.
Thats it ... THANK YOU
#JavaInspires
#NodeJsPractice
#SilentTutorial