title: Checking for null and empty values in javascript
body: <p>What is wrong with this if statement? If i pass not empty values i still don't get in to the if block</p>
  
  <p>Both <code>val1</code> and <code>val2</code> have values:</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 val1 = 'category'
  let val2 = 'medical'
  
  if ((val1 !== null || val1 !== '') &amp;&amp; (val2 !== null || val2 !== '')) {
  
    console.log(val1, val2);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p><code>val1</code> is empty and <code>val2</code> has a value:</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 val1 = ''
  let val2 = 'medical'
  
  if ((val1 !== null || val1 !== '') &amp;&amp; (val2 !== null || val2 !== '')) {
  
    console.log(val1, val2);
  }</code></pre>
  </div>
  </div>
  </p>