Created
March 7, 2019 04:47
-
-
Save IngIeoAndSpare/a1ac8762833b222dd715100a0757843a to your computer and use it in GitHub Desktop.
get user input use readline-sync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readLineSync = require('readline-sync'); | |
var userInput = [], | |
menuText = []; | |
function getUserInput() { | |
// get user input text | |
for(let consoleLine of menuText) { | |
userInputData.push(readLineSync.question(consoleLine)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment