title: Why does this code runs correctly with loose equality than with strict equality?
body: <p>I tried to code the snippets with both strict equality and loose equality to count the total number of <strong>truthy</strong> values in the given array. </p>
  
  <p>The code runs correctly with the loose equality </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>let array = [0, '0', true, 100, false, NaN];
  
  countTruthy(array);
  
  function countTruthy(array){
      let count = 0 ;
      
      for (let element of array){
          if (element == (null || undefined || NaN || false || 0 || '')){ //comparing with loose equality
              continue;
          }
          console.log(element);
          count++
      }
      console.log (`The total truthy in the array is : ${count}`);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>While the code gives incorrect count with strict equality.</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>let array = [0, '0', true, 100, false, NaN];
  
  countTruthy(array);
  
  function countTruthy(array){
      let count = 0 ;
      
      for (let element of array){
          if (element === (null || undefined || NaN || false || 0 || '')){//Using the strict equality
              continue;
          }
          console.log(element);
          count++
      }
      console.log (`The total truthy in the array is : ${count}`);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I also tried the </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>console.log(undefined === undefined);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Why am I getting the wrong count with strict equality while correct count with loose equality?</p>
  
  <p>I also know there is efficient way to write the same code. So please give suggestions only for the above issues I am facing.</p>