title: call global object in the main app.js from seperate file private function
body: <p>i built an app on 1 page, and now i want to oragenize all of its functions and objects in seperate files and directories, and import them to the app.js file. but im having some problems with global objects, the the imported functions dosent recognize them.</p>
  
  <p>example:</p>
  
  <pre><code>    //app.js 
       const req_obj = require("./objectFile.js")
  
       const tool = {
         number:4   
       } 
       req_obj.obj.addFive() // this will print "cant read number of undefined" 
  
  
  
     //objectFile.js
       const req_func = require("./function.js") 
  
       exports.obj = {
         addFive:req_func.addFive
       }
  
  
  
    //function.js
  
      exports.addFive = function(){
         return tool.number + 5
       }
  </code></pre>
  
  <p>i know that it might be that im doing all wrong, and this is not how you orgenize an app and call its function. i whould be really glad if some1 will explaine my how to orgenize an app, and call its functions the right way, if what i did is wrong.</p>