repl.it
@timmy_i_chen/

readline-sync-demo

Nodejs

No description

fork
loading
Files
  • index.js
  • Packager files
  • package-lock.json
index.js
1
2
3
4
5
6
// add this in at the top of your program
var { question } = require('readline-sync');

// use `question()` instead of `prompt()` to get input
var userName = question('May I have your name? ');
console.log('Hi ' + userName + '!');