title: Properties of Javascript function objects
body: <p>I have a JavaScript function object as;</p>
  
  <pre><code>var addNum = function(num1, num2) {
          return num1 + num2;
  }
  </code></pre>
  
  <p>Now if I try to access </p>
  
  <pre><code>addNum.divide()
  </code></pre>
  
  <p>I wanted to understand the prototype chain for the above code. I read that in the above example, addNum would be searched for divide(), followed by Function.prototype and finally Object.prototype. </p>
  
  <p>But my question is in the above example, how can addNum would be searched for divide()</p>
  
  <p>Does it refer to something like ;</p>
  
  <pre><code>var addNum = function(num1, num2) {
  
  this.divide = function(){}
  
              return num1 + num2;
      }
  </code></pre>
  
  <p>I could not understand the line where it says addNum would be searched for divide()</p>
  
  <p>Please help me understand the same.</p>