JavaScript === vs == for type checking : <p>Which of the following lines is correct?...</p>

<pre><code>if (typeof value == 'boolean') { return value; }
</code></pre>

<p>... or ...</p>

<pre><code>if (typeof value === 'boolean') { return value; }
</code></pre>

<p>I thought the double equal sign was a type of "soft compare" so the <code>value</code> variable could either be a <code>string</code> or formal type.  Is this not so?  I wonder because JSHint complained about the first version.  I've changed it but now I'm worried that <code>typeof</code> won't return a string.</p>
