title: Javascript conditional return statement (Shorthand if-else statement)
body: <p>While writing shorthand if-else in javascript,getting syntax error. Here is my code:</p>
  
  <pre><code>data &amp;&amp; data.cod   ==  '404' &amp;&amp; return;
  </code></pre>
  
  <p>Although works fine when I use normal if-else like below:</p>
  
  <pre><code>        if(data &amp;&amp; data.cod   ==  '404') {return};
          var temp        =   data &amp;&amp; data.main &amp;&amp; data.main.temp;
         //Code here...
  </code></pre>
  
  <p>I know, it works fine if I use ternary operator like <code>return (data &amp;&amp; data.cod   ==  '404')?'true':'false';</code> but I'm looking "return" on conditional basis otherwise continue further. </p>