Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const readline = require('readline');
- const rl = readline.createInterface({
- input: process.stdin,
- output: process.stdout
- });
- const question = text => new Promise(resolve => {
- rl.question(text, answer => {
- resolve(answer);
- rl.close();
- })
- });
Add Comment
Please, Sign In to add comment