Duy KhanhPro Student 4,911 Points
Why we need process.argv.slice(2) ?
Anyone can explain about process.argv.slice(2)? Why we need to slice and why the param is 2 ?
Steven Parker171,345 Points
The "argv" array contains everything given on the command line. The first item (argv) will be the path to node itself, and the second item (argv) will be the path to your script code.
So a slice starting at 2 will discard both of those and return everything else that was typed on the command line. These are the arguments that will be used to construct the API query string.