title: Best approach Shortahand or Short-circuiting in Javascript
body: <p>Which approach is most recommended. First or Second ?</p>
  
  <pre><code>function(x,y) {
    // 1
    var foo = x ? x.a : y;
    // 2
    var foo = x &amp;&amp; x.a || y;
  } 
  </code></pre>