Reading Console Input using Node.js
Reading Console Input using Node.js
Is it possible to take in Console Input using Node.js? My way is not working.
The Repl
DCha0tiC (0)
I know it's an old thread, but maybe you can use :
let answerText = prompt("Your question goes here");
let answerBool = confirm("Yes/No question goes here);"
It works nice with Repl console.
Source: W3Schools Js Popups
It is possible, I don't code Node.js but I found this from https://flaviocopes.com/node-input-from-cli/
Hope that helps!
@Pythonier : That's exactly what I have! However, it just displays the question and skips the input and the action after the input.
@vedprad1 Weird, try requiring readline-sync instead. ex:
@vedprad1 Is this what you are looking for:
@Pythonier : This seems to work! Thanks!
@vedprad1