title: Exporting and Importing javascript objects
body: <p>I think I am asking a simple question but I only started learning javascript in recent days. I was trying to import the exported object present in another file, but not able to access its keys.
  In the first file, my code is :</p>
  <pre><code>module.exports =()=&gt;{
  return{
      userid:&quot;userid&quot;,
      password:&quot;password&quot;
  }};
  </code></pre>
  <p>the file name in which it is stored is &quot;demousable.js&quot;</p>
  <p>And for importing this object into another file, I wrote the following code in another file</p>
  <pre><code>const details =require(&quot;./demousable&quot;);
  console.log(details.userid);
  </code></pre>
  <p>But I got &quot;undefined&quot; in output.
  Please mention where I went wrong. Thank you</p>