title: my if statement does not work
body: <p>This JavaScript code is to change the background of a div if the content is different:</p>
  
  <pre><code>function myfunction() {
      $a = document.getElementById('t').getElementsByTagName('div');
      var x = 0;
      while(x &lt; $a.length) {
          var b = ($a[x].innerHTML);
          b.toString;
          alert(x + b[x]);
          if(b == 'PENDING SELECTING TEAM MEMBER' ||b == 'PENDING APPROVAL BY SCHEME MANAGER' ||b == 'PENDING SELECTING TEAM MEMBER' ||b == 'PENDING REVIEW TEAM MEMBER BY LEAD ASSESSOR' ||b == 'PENDING ACKNOWLEDGEMENT BY TA/LA' ||b == 'PENDING PREPARE AUDIT PLAN BY LA' ||b == 'PENDING REVIEW AUDIT PLAN BY AO' ||b == 'PENDING ACCEPT LA BY LAB' ||b == 'PENDING VERIFY REASON BY AO' ||b == 'PENDING CONDUCT ASSESSMENT' || b == 'PENDING CORRECTIVE ACTION BY CAB' || b == 'PENDING REVIEW BY AO' || b == 'PENDING CORRECTIVE ACTION APPROVAL BY SCHEME MANAGER' ||b == 'PENDING APPROVAL BY DOA' ){
              document.getElementById('status'+x).style.background="maroon";
              alert(x + b);
          }
          x++;
  
      }
  }
  </code></pre>
  
  <p>It doesn't work because the <code>if</code> statement is failing. </p>
  
  <p>Can someone help me figure out what's wrong?</p>