title: Why objects are not recognized if declared after the function that uses them
body: <p>Here is a simple example: I have two functions: <code>someFunction</code> and <code>someFunction2</code>.</p>
  
  <p><code>someFunction</code> recognizes <code>someFunction2</code> event thoug it is defined after <code>someFunction</code>. It is different with the object <code>someVar</code> thoug. If it is defined after the function that uses it, it is not recognized by the function hence <code>undefined</code>. But if the object is defined before the funcution that uses it the function itself recognizes the objec. Here is an example that showcase:</p>
  
  <pre><code>function someFunction() {
      console.log(someVar)
      someFunction2()
  }
  
  someFunction()
  
  function someFunction2() {
      console.log("Some Function 2 has been called")
  }
  
  var someVar = 'Some Var Displayed Here'
  </code></pre>
  
  <p>In the case above <code>someFunction</code> recognizes <code>someFunction2</code> but doesn't recognize the object <code>someVar</code> WHY? what is the difference between the <code>someFunction2</code> and <code>someVar</code>?</p>