Why does typeof NaN return 'number'?
<p>Just out of curiosity. </p>

<p>It doesn't seem very logical that <code>typeof NaN</code> is number. Just like <code>NaN === NaN</code> or <code>NaN == NaN</code> returning false, by the way. Is this one of the peculiarities of javascript, or would there be a reason for this?</p>

<p>Edit: thanks for your answers. It's not an easy thing to get ones head around though. Reading answers and the wiki I understood more, but still, a sentence like </p>

<blockquote>
  <p>A comparison with a NaN always returns an unordered result even when comparing with itself. The comparison predicates are either signaling or non-signaling, the signaling versions signal an invalid exception for such comparisons. The equality and inequality predicates are non-signaling so x = x returning false can be used to test if x is a quiet NaN. </p>
</blockquote>

<p>just keeps my head spinning. If someone can translate this in human (as opposed to, say, mathematician) readable language, I would be gratefull.</p>
