javascript:core execution concept
<pre><code>  function foo(){ alert(this);}
  x=new foo();//this is equal to {foo();}//foo() is operating on the newly created object...
</code></pre>

<p>Now, according to the definition of this keyword "this points to the current object on which the function operates"</p>

<p>Since the above function operates on the newly created object the this keyword points to it. Now,again:</p>

<pre><code>function foo(){
      //this function foo is an javascript object right?

 }
</code></pre>

<p>So when I create a nested function within it like this,and execute it there itself</p>

<pre><code> function foo(){
 function fo()
      {
       alert(this);//"this" keyword now should point to javascript function object
      }
 fo();//fo here is operating on javascript function object
}
foo();
</code></pre>

<p>So now when the function <code>foo()</code> executes the this keyword should point to the function foo object as per the above definition.</p>

<p>Don't say this: "the value of this keyword depends on how u invoke a function"</p>

<p>I know I'm invoking the function plainly but as per the above definition is my view correct than?</p>
