showing results for - "javascript read input from terminal"
Yasmina
24 Apr 2020
1const readline = require('readline').createInterface({
2  input: process.stdin,
3  output: process.stdout
4});
5 
6readline.question('Who are you?', name => {
7  console.log(`Hey there ${name}!`);
8  readline.close();
9});