title: Using && as a replacement for IF statement
body: <p>I found the following snippet when digging through some code:</p>
  
  <pre><code>"string" != typeof myVar &amp;&amp; (myVar = "");
  </code></pre>
  
  <p>I understand what happens here. If myVar is not a string, that first condition evaluates to true so the second condition is evaluated, causing myVar to be set to "". So it's essentially a replacement for the following:</p>
  
  <pre><code>if ("string" != typeof myVar)
      myVar = "";
  </code></pre>
  
  <p>The only discernible difference is that the former of the two strategies is also a return statement, though the code I found is not using the returned value. So I'm wondering:</p>
  
  <ol>
  <li>Are there any pros or cons to either strategy?</li>
  <li>If the only pro for the first strategy is the ability to return a value, is the snippet I found considered poor programming since it is more difficult to read?</li>
  </ol>