title: Difference between "if (foo) bar();" and "foo && bar();"
body: <p>Is there any difference between the following two snippets, or any reason to use one over the other?</p>
  
  <pre><code>if (foo) {
      bar();
  }
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>foo &amp;&amp; bar();
  </code></pre>