title: Using `this` for Parent Function inside a Nested Function
body: <p>In the Apple "classs", how can the nested function <code>countSeeds()</code> retrieve the value <code>this.price</code>?</p>
  
  <p><strong>jsfiddle:</strong> <a href="http://jsfiddle.net/VGqEa/" rel="nofollow">http://jsfiddle.net/VGqEa/</a></p>
  
  <pre><code>Apple = function() {
      this.price = 17
  
      this.cutOpen = function() {
  
          console.log(this.price);
          countSeeds();
  
          function countSeeds() {
              console.log(this.price);
          }
      }        
  }
  
  
  var apple = new Apple();
  apple.cutOpen();
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>17
  undefined
  </code></pre>