What is the best way to pass the this pointer in JavaScript?
<p>Say I have two functions in JavaScript, and I want to pass the <code>this</code> pointer from one to the other. I know two ways to do this (shown below). Which one is the best practice?</p>

<p><strong>Option 1:</strong></p>

<pre><code>function a() {
    b(this);
}

function b(elem) {
    alert(elem);
}
</code></pre>

<p><strong>Option 2:</strong></p>

<pre><code>function a() {
    b.call(this);
}

function b() {
    alert(this);
}
</code></pre>
