📜  javascript代码示例中的readline

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

代码示例1
//Node.js readline
const readline = require('readline');

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout
});

rl.question('What do you think of Node.js? ', (answer) => {
  console.log(`Thank you for your valuable feedback: ${answer}`);
  rl.close();
});