How can I obtain system arguments in node.js?

node helloworld.js alex

I want it to console.log() alex. How do I pass "alex" as an argument into the code?

In python ,it is sys.argv[1]

You can access command line arguments using process.argv in node.js.

The array also includes the node command and the application file, so the first custom command line argument will have an index = 2.

process.argv[2] === 'alex'; // true

http://nodejs.org/api/process.html#process_process_argv

If your requirements are more complex and you can take advantage of a command line argument parser, there are several choices. Two that seem popular are

More options available at How to pass command line arguments to Node.js?