title: Compare undefined/null/NaN with number in ActionScript
body: <p>In ActionScript 1 and 2, if you compare <code>undefined</code>, <code>null</code> or <code>NaN</code> with an arbitrary number using <code>&gt;=</code> or <code>&lt;=</code> operator, the result is always <code>true</code>. Test code:</p>
  
  <pre><code>var x, n, range = 1000;
  for (var i = 0; i &lt; 3; ++i) {
      switch (i) {
          case 0:
              x = undefined;
              break;
          case 1:
              x = null;
              break;
          case 2:
              x = NaN;
              break;
      }
      n = range*Math.random();
      trace(x + ' &gt;= ' + n + ': ' + (x &gt;= n));
      n = range*Math.random();
      trace(x + ' &lt;= ' + n + ': ' + (x &lt;= n));
  }
  </code></pre>
  
  <p>Furthermore, <code>isNaN(null)</code> return <code>true</code>.</p>
  
  <p>These are contrary to JavaScript and may not conform with ECMA standard.</p>
  
  <p>Are these <strong>bugs</strong> or <strong>intention</strong>?</p>
  
  <p>Thanks!</p>