I would like to ask a series of question to users in one function using
<input type="text" id="input">
In C, the scanf() function allows you to wait for user response and continue if the user enters a value. In JavaScript, how can I wait for user response in a function without using prompt() ?