Skip to content

Instantly share code, notes, and snippets.

@jaxatax
Forked from topherPedersen/user_input.js
Created April 30, 2019 23:58
Show Gist options
  • Save jaxatax/41583b000ae0e28f7acfef16bb4917ab to your computer and use it in GitHub Desktop.
Save jaxatax/41583b000ae0e28f7acfef16bb4917ab to your computer and use it in GitHub Desktop.
Command-Line User Input in JavaScript (node.js)
// Code Snippet by Timmy Chen
// REFERENCE: https://repl.it/@timmy_i_chen/readline-sync-example-node
const rs = require('readline-sync');
const x = rs.question('enter thing: ');
console.log('wow you entered ' + x);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment