Get nodejs to wait for user input to console
How would I get nodejs to wait for me to enter something into the console?
I am using 'readline' but it looks like it skips it anyway.
Is this a repl terminal problem?
Voters
Ask coding questions
How would I get nodejs to wait for me to enter something into the console?
I am using 'readline' but it looks like it skips it anyway.
Is this a repl terminal problem?
Use readline-sync instead. Readline is asynchronous, meaning it will trigger a function on input instead of trigger an input instance.
@Vandesm14 Thanks