- #Input and getoutput for a textbar on js how to#
- #Input and getoutput for a textbar on js full#
- #Input and getoutput for a textbar on js code#
#Input and getoutput for a textbar on js code#
You can add the timer like in the code above for time-sensitive questions.Īs you can see from the example above, the readline module is quite complex compared to the easy prompt() method from the browser.Īlternatively, you can use the npm prompt-sync module to ask for user input without using the readline module. This will create a single line text input field. To set the type attribute to have a value of text.