title: Javascript equivalent for scanf()
body: <p>I would like to ask a series of question to users in one function using </p>
  
  <pre><code>&lt;input type="text" id="input"&gt;
  </code></pre>
  
  <p>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() ?</p>