title: Javascript - comparing loaction.pathname not working as expected with or operator
body: <p>I am trying to get the loacation.pathname of the current page and compare it to see if its /Login or /Register, if it is one of those the code in the if should not be executed.</p>
  <p><strong>Code:</strong></p>
  <pre><code>if (location.pathname != '/Login' || location.pathname != '/Register')
       {
         prevView.push(location.href); // Add View to PreviousView so when needed we can navigate back to previous Page/View
         prevView.shift(); // Remove the First element from the array
       }
  </code></pre>
  <p><strong>I also tried:</strong></p>
  <pre><code>if ((location.pathname != '/Login') || (location.pathname != '/Register')
  </code></pre>
  <p><strong>and</strong></p>
  <pre><code> if (((location.pathname != '/Login') || (location.pathname != '/Register')))
  </code></pre>
  <p>But not working - what am I doing wrong.</p>
  <p><a href="https://i.stack.imgur.com/igPmU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/igPmU.png" alt="img1" /></a></p>
  <p><a href="https://i.stack.imgur.com/ZjZVB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZjZVB.png" alt="Img2" /></a></p>