Javascript:function context ,window context
<p>Does js engine execute the local function in window context?</p>

<pre><code>function foo()
{
   function fo()
  { 
  alert(this)//this points to window,so the nested function is getting executed on window context
   }

fo()
}
</code></pre>
