title: How to use readlineSync on Nodejs
body: <p>So I'm trying out readlineSync to get user input (saw it was the best option to get user input). But then it doesn't output to the console. And it breaks out of node as soon as its done running. Help me out.</p>
  
  <pre><code>var readlineSync = require("readline-sync");
  var firstName = readlineSync.question("First Name:");
  console.log("Hi" + firstName);
  </code></pre>
  
  <p>"Expected Output: Hi Ifeoluwa"</p>
  
  <p>"Actual result: Undefined and node exits automatically"</p>
  
  <p><a href="https://i.stack.imgur.com/68HTj.jpg" rel="nofollow noreferrer">Node Console</a></p>