title: how this behaves inside closure
body: <p>i am trying to understand different aspects of closure.Here i have created a nested closure of function returning functions.I called the first function which this is bound to another object called "obj".First outpup is set to current object "obj".But the inner function's "THIS" is set to original "WINDOW" object.Why the are not pointing to "obj" variable.Because first "THIS" is set to "obj".Other "THIS" should be set to "obj" too,shouldn't it ?</p>
  
  <pre><code>function one(){
     console.log(this);
     return function(){
        console.log(this);
        return function(){
           console.log(this);
        }
     }
  }
  var obj={};
  one.call(obj)()();
  </code></pre>
  
  <blockquote>
    <p>output is :</p>
    
    <p>obj</p>
    
    <p>window</p>
    
    <p>window</p>
  </blockquote>