title: Undefined when returning value
body: <p>I've node project.
  Root file is <code>index.js</code> and file <code>helper.js</code>, here I've some helper functions and it imported to <code>index.js</code>.
  I'm trying to get some data, using function in <code>helper.js</code>, but when I calling it in <code>index.js</code> it returning <code>undefined</code>.
  But in <code>helper.js</code> everething is OK, <code>console.log</code> showing data that I need.
  How I can fix this problem?</p>
  
  <p>index.js file content:</p>
  
  <pre><code>const helper = require('./helper');
  
  let data = helper.getData();
  console.log(data); // undefined
  </code></pre>
  
  <p>helper.js file content:</p>
  
  <pre><code>const fs = require('fs');
  
  module.exports = {
    getData: () =&gt; {
      fs.readFile('data.json', 'utf8', (err, data) =&gt; {
        const allData = JSON.parse(data);
        console.log(allData); // IS OK!
        return allData;
      });
    }
  }
  </code></pre>