Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Just as you would pass command line arguments to most other applications:

$ test.js mary had a little lamb

The arguments can be handled within your script through the process.argv[] array.
From your script it would look something like:

var variableNameTwo = process.argv[1]; // set to 'mary'
var variableNameFour = process.argv[3]; // set to 'a'
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.