title: Javascript Empty String Comparison
body: <p>I don't understand why one scenario evaluates false and the other true. </p>
  
  <p>Scenario 1:</p>
  
  <pre><code>&gt; '' == ''
  true
  </code></pre>
  
  <p>Scenario 2: </p>
  
  <pre><code>&gt; '' == ('' || undefined)
  false
  </code></pre>
  
  <p>Is scenario 2 not asking if (empty string) is equal to: (empty string) OR undefined? </p>
  
  <p>I'm sure I'm missing something fundamental here, which is really what I'm trying to figure out. I can easily code around this, but I'd like to learn <em>why</em> it's happening... for next time, ya know?</p>