I've read several related questions here but still can't figure out what I'm doing wrong. Here's my script (simple.js):
var x = process.argv[2]
console.log(x);
now when I type in the REPL
.load simple.js Hello
the REPL answers
Failed to load:simple.js Hello
but I've done this (simple2.js):
console.log(process.argv);
and when I .load this file in REPL it answers
> console.log(process.argv);
[ 'C:\\Program Files\\nodejs\\node.exe' ]
undefined
.loadis designed for this sort of thing. You probably have to use the standardnode simple.js Helloin terminal.