1const readline = require("readline");
2
3const rl = readline.createInterface({
4 input: process.stdin,
5 output: process.stdout
6});
7
8rl.question("What is your name ? ", function saveInput(name) {
9 console.log(`His name is ${name}`);
10 rl.close();
11});
12
13rl.on("close", function saveInput() {
14 console.log("\nBYE BYE !!!");
15 process.exit(0);
16});