Javascript function call context
<p>I have this situation:</p>

<p>A JavaScript <code>function A(){}</code> and another<code>function B(){}</code>.</p>

<p>I call function A in two modes:</p>

<ul>
<li>as a parameter of function B -- <code>B(A());</code></li>
<li>in standalone form -- <code>A();</code></li>
</ul>

<p>Is there a way to sense in code when function A is evaluated as parameter and when is executed as standalone?</p>
