How do I combine undefined with booleans in JavaScript?
<p>For example suppose I have</p>

<pre><code>var myVar;
</code></pre>

<p>If I do</p>

<pre><code>console.log((myVar != undefined) &amp;&amp; true);
</code></pre>

<p>It returns false as expected.  Is it possible to do something closer to</p>

<pre><code>console.log(myVar &amp;&amp; true);
</code></pre>

<p>It's much less verbose.  At the moment the above returns undefined I would like false.</p>
