title: How to use multiple OR and & clause in one IF condition?
body: <p>I'm trying to use multiple OR and &amp; clause in 1 IF condition using javascript.</p>
  
  <p>but my code doesn't seem to work.</p>
  
  <p>This is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>localStorage.setItem('subbed', 'yes');
  
  var isFree = '0';
  
  if ((isFree == '0' &amp;&amp; localStorage.getItem('subbed') == null) ||
    (isFree == '0' &amp;&amp; localStorage.getItem('strip_subbed') == null)) {
    console.log('locked');
  } else {
    console.log('not locked');
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>if you run my code, its always <code>alert('locked')</code> which is wrong. Because the <code>subbed</code> <code>localstorage</code> is being set before everything else and it is not <strong>null</strong>.</p>
  
  <p>so what I basically need to do is to look <code>IF</code> the <code>localstorage subbed OR stripe_subbed is not null and isFree variable is not 0</code> and then unlock something (alert('not locked') in this instance).</p>
  
  <p>I hope i make sense and someone can help me.</p>
  
  <p>Here's a working fiddle as well: <a href="https://jsfiddle.net/13Lbdmqr/" rel="nofollow noreferrer">https://jsfiddle.net/13Lbdmqr/</a></p>