title: x >= x pattern in JavaScript
body: <p>When reading source of D3.js I saw <code>x &gt;= x</code> pattern. If it is for detecting NaNs among numbers, why not just <code>isNaN(x)</code> or <code>x == x</code>?</p>
  
  <p><a href="https://github.com/mbostock/d3/blob/master/d3.js#L52-L67" rel="noreferrer">Source, where I encountered it</a>: </p>
  
  <pre><code>d3.min = function(array, f) {
    var i = -1, n = array.length, a, b;
    if (arguments.length === 1) {
      while (++i &lt; n) if ((b = array[i]) != null &amp;&amp; b &gt;= b) {
        a = b;
        break;
      }
      while (++i &lt; n) if ((b = array[i]) != null &amp;&amp; a &gt; b) a = b;
    } else {
      while (++i &lt; n) if ((b = f.call(array, array[i], i)) != null &amp;&amp; b &gt;= b) {
        a = b;
        break;
      }
      while (++i &lt; n) if ((b = f.call(array, array[i], i)) != null &amp;&amp; a &gt; b) a = b;
    }
    return a;
  };
  </code></pre>