+ 2
How do you get user input in Node js?
I looked into it and I don't get it, I tried using require("prompt-sync") but the module doesn't exist.
4 ответов
+ 15
The "readline" example seem to work in the playground
https://nodejs.org/en/knowledge/command-line/how-to-prompt-for-command-line-input/
The "prompt" example fails :/
+ 4
With multi inputs
https://code.sololearn.com/c8R718TmbAdH/?ref=app
+ 4
I made this for you:
https://code.sololearn.com/cNHAGdbN4Mqc/?ref=app
+ 3
Burey Thanks for the answer, it needs some tweaking but seems to work
https://code.sololearn.com/czue8PZUmQog/?ref=app