title: Javascript: why "this" inside the private function refers to the global scope?
body: <p>Consider the following code:</p>
  
  <pre><code>function A() {}    
  
  A.prototype.go = function() {
      console.log(this); //A { go=function()}
  
      var f = function() {
           console.log(this);  //Window              
      };
  
      f();
  }
  
  var a = new A();
  a.go();
  </code></pre>
  
  <p>Why does 'this' inside function 'f' refers to the global scope? Why it is not the scope of function 'A' ?</p>