📜  在节点 js 中获取用户输入 - Javascript 代码示例

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

代码示例2
//Make sure you have Node and NPM installed
//Run "npm install prompt-sync" in the terminal
const prompt = require('prompt-sync')();

const name = prompt('What is your name?');
console.log(`Hey there ${name}`);