1const readline = require('readline').createInterface({
2 input: process.stdin,
3 output: process.stdout
4});
5
6readline.question('who are you: ', name => {
7 console.log(`hello, hi there ${name}`);
8 readline.close();
9})
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});
1const readline = require('readline').createInterface({ input: process.stdin, output: process.stdout}); readline.question('Who are you?', name => { console.log(`Hey there ${name}!`); readline.close();});