What is technically more efficient to match expected strings?
<p>What's better? If:</p>

<pre><code>function a(){};
</code></pre>

<p>then is it faster to process this</p>

<pre><code>if(typeof a == "function"){func(arg);}
</code></pre>

<p>or this?</p>

<pre><code>if(!(typeof a).search("f")){func(arg);}
</code></pre>

<p>I'm only asking this because in my opinion its easier to match first symbol of string than entire string, no? Interested in making sure.</p>
