title: Why are JavaScript negative numbers not always true or false?
body: <pre><code>-1 == true;        // false
  -1 == false        // false
  -1 ? true : false; // true
  </code></pre>
  
  <p>Can anyone explain the above output? I know I could work round this by comparing to 0 but I'm interested. I'd expect at least one of the sloppy equals statements to be true as they do implicit type conversion, and I certainly didn't expect the ternary to come up with a totally different result.</p>