How does 'this' works in javascript?
<p>hi i am a little confusion on how exactly <code>this</code> works in javascript.Based on this example:</p>

<pre><code>var myFunction = function(){
 function testMe(){
  console.log(this)  --------&gt; DOMwindow
 }
 console.log(this) ---------&gt; myFunction
}

var myvariable = new myFunction();
</code></pre>

<p>What is happening here?</p>
