title: node export module unknown console log "undefined"
body: <p>So i'm learning to export modules with node.js</p>
  
  <p>in test.js I have  (test.js is where the module is writen)</p>
  
  <pre><code>var Library={
      name:"Timmy",
      greet:function(name){
          console.log("Hello from the "+ name);
      }
  }
  module.exports.Library=Library;
  </code></pre>
  
  <p>in server.js I have:</p>
  
  <pre><code>var test=require('./test.js'); 
  console.log(test.Library.greet())
  </code></pre>
  
  <p>then when I run   node server.js  in the terminal, it gives this:</p>
  
  <pre><code>Hello from the Timmy library.
  undefined
  </code></pre>
  
  <p>What does this "undefined" mean? An error?</p>
  
  <p>I found similar question here, but it was too complicated an example that I couldn't understand..
  <a href="https://stackoverflow.com/questions/26291204/node-module-export-returning-undefined">Node Module Export Returning Undefined</a></p>