title: Double pipes in JavaScript (||) throw error instead of evaluate as falsy
body: <p>I read that the double pipes in JavaScript check to see if a variable is falsy, and that <code>undefined</code> is a falsy value in JavaScript, e.g.</p>
  
  <blockquote>
    <p>It means that if the value is falsey (e.g. 0, "", null, undefined (see
    also All falsey values in JavaScript)), it will be treated as false;
    otherwise it's treated as true.</p>
  </blockquote>
  
  <p>So I tried this out and find that undefined indeed does not get evaluated as falsy but instead throws an error: </p>
  
  <pre><code>let elemContent = document.getElementById('content');
  
  let a = null;
  let b = 2;
  
  elemContent.innerHTML += a || 'ok'; // "ok"
  elemContent.innerHTML += b || 'ok'; // "2"
  elemContent.innerHTML += whatever || 'ok'; // "ERROR: whatever is not defined"
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ueqo6yko" rel="noreferrer">http://jsfiddle.net/ueqo6yko</a></p>
  
  <p><strong>Is <code>undefined</code> a falsy value in JavaScript or not, or how does one understand this contradiction?</strong></p>