title: javascript if && OR
body: <p>Folks,
    I have an if statement that should check if <code>err</code> is defined, and if so, see if its <code>ETIMEDOUT</code> or <code>ESOCKETTIMEDOUT</code></p>
  
  <p>Is this syntactically sound?</p>
  
  <pre><code>if (err &amp;&amp; err.code === 'ETIMEDOUT' || 'ESOCKETTIMEDOUT') {
  }
  </code></pre>
  
  <p>Or Should it look like:</p>
  
  <pre><code>if (err &amp;&amp; (err.code === 'ETIMEDOUT' || 'ESOCKETTIMEDOUT')) {
  }
  </code></pre>