📜  回复 nodejs 终端 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:47.548000             🧑  作者: Mango

代码示例1
process.stdout.write("What's your name?\n");

process.stdin.on('readable', () => {
  const userInput = process.stdin.read();
  process.stdout.write(`Your Input was: ${userInput}`);
});