Check what context "this" refers to in javascript
<p>I want to know what context "this" refers to at a given time in my code.</p>

<p>I know there are rules but there has to be a way to check it by code.</p>

<p>How do I do that?</p>
