1before executing the command node in terminal you have to install
2 :~$ npm install prompt-sync
3if you havent already.
4then inside node
5 >const prompt = require('prompt-sync')();
6 >name = prompt('What is your name? '); michael
7 >console.log(`Hey there ${name}`);
8Hey there michael