title: ReferenceError: answer is not defined
body: <pre><code>const readline = require('readline');
  
  const rl = readline.createInterface({
    input: process.stdin,
    output: process.stdout
  });
  
  if (user_question!=false){
  rl.question('What do you think of Node.js? ', (answer) =&gt; {
    // TODO: Log the answer in a database
    console.log(`Thank you for your valuable feedback: ${answer}`);
    rl.close();
  });
  console.log(calling_a_function(answer))
  }
  </code></pre>
  
  <p>How can i fix the ReferenceError: answer is not defined
   error.</p>