I want to read three values from a console into a JS object - how can I do this?
var stdin = process.openStdin();
console.log('Provide first parameter: ');
stdin.addListener("data", function (d) {
console.log(d.toString().trim());
});
I know that I can attach an event to the stdin stream, and read responses, but it only works for one input. How can I ask for more parameters?
via user99999
No comments:
Post a Comment