Guest User

Untitled

a guest
Mar 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. const readline = require('readline');
  2.  
  3. const rl = readline.createInterface({
  4. input: process.stdin,
  5. output: process.stdout
  6. });
  7. const question = text => new Promise(resolve => {
  8. rl.question(text, answer => {
  9. resolve(answer);
  10. rl.close();
  11. })
  12. });
Add Comment
Please, Sign In to add comment