title: Is it possible to use promises for this example?
body: <p>I am basically trying to write a very basic program that will work like this:</p>
  
  <pre><code>Enter your name: _
  Enter your age: _
  
  Your name is &lt;name&gt; and your age is &lt;age&gt;.
  </code></pre>
  
  <p>I've been trying to figure out how to do something like this in Node without using the <code>prompt</code> npm module.</p>
  
  <p>My attempt at this was:</p>
  
  <pre><code>import readline from 'readline'
  
  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
  })
  
  rl.question('What is your name? ', (name) =&gt; {
    rl.question('What is your age? ', (age) =&gt; {
      console.log(`Your name is ${name} and your age is ${age}`)
    })
  })
  </code></pre>
  
  <p>However, this nested way of doing it seems weird, is there anyway I can do it without making it nested like this to get the right order?</p>