title: Javascript OR statement always true
body: <p>I want to check to see if the user is <strong>not</strong> logged into Wordpress (body would contain class 'logged-in') OR if the user is not on the <strong>my-resources</strong> section (foo.co.uk/my-resources/). If either fails I want the else statement to kick in. </p>
  
  <p>However my code <strong><em>always</em></strong> comes back as true:</p>
  
  <pre><code>if(!$('body').hasClass('logged-in') || (document.location.href.indexOf('/my-resources/') === -1))
  {
      console.log ( 'DO SOMETHING. The user is not logged in or in my resources' );
  }
  else
  {
      console.log ( 'DO NOTHING. The user is logged in or in my resources' );
  }
  </code></pre>