The code is
console.log(process.argv[2]);
I get the following in console
node task.js ABC
'ABC'
<empty line>
Or without parameters (code is commented)
node task.js
<empty line>
How can i remove it?
EDIT: changed console.out to console.log
The code is
console.log(process.argv[2]);
I get the following in console
node task.js ABC
'ABC'
<empty line>
Or without parameters (code is commented)
node task.js
<empty line>
How can i remove it?
EDIT: changed console.out to console.log
You may try this:
process.stdout.write("test")
It will display your output directly to stdout, so It will not return empty line.
How do you edit existing text (and move the cursor around) in the terminal?
Or if you need 1 line up
process.stdout.write('\033[1A');