@timmy_i_chen/

readline-sync-demo

Nodejs

No description

fork
loading
Files
  • index.js
  • package-lock.json

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.33812231281335303","path":"index.js","file":{"path":"index.js","content":{"asEncoding":{"base64":"Ly8gYWRkIHRoaXMgaW4gYXQgdGhlIHRvcCBvZiB5b3VyIHByb2dyYW0KdmFyIHsgcXVlc3Rpb24gfSA9IHJlcXVpcmUoJ3JlYWRsaW5lLXN5bmMnKTsKCi8vIHVzZSBgcXVlc3Rpb24oKWAgaW5zdGVhZCBvZiBgcHJvbXB0KClgIHRvIGdldCBpbnB1dAp2YXIgdXNlck5hbWUgPSBxdWVzdGlvbignTWF5IEkgaGF2ZSB5b3VyIG5hbWU/ICcpOwpjb25zb2xlLmxvZygnSGkgJyArIHVzZXJOYW1lICsgJyEnKTs="},"asBuffer":null},"loaded":true}}
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 + '!');
node v10.16.0