title: short circuit with a return statement
body: <p>As far as I understand, short-circuiting with the logical AND &amp;&amp; operator works like the following: </p>
  
  <p>Assuming I have the expressions <code>a</code> and <code>b</code> then <code>a &amp;&amp; b</code> is the same as <code>a ? b : a</code> since</p>
  
  <p>if <code>a</code> is truthy then the result will be <code>b</code> and
  if <code>a</code> is falsy then the result will be <code>a</code> (without even trying to resolve <code>b</code>)</p>
  
  <p>That being the case why is the following (demo) code throwing a SyntaxError:</p>
  
  <pre><code>var add = function(a,b) {
    b &amp;&amp; return a+b; // if(b) return a+b
    ...
  }
  </code></pre>
  
  <p>Is there a way to short circuit with a return statement?</p>