Recently I found one weird line in the jQuery sources (last version 1.9.1, Sizzle package, line 129 funescape function):
funescape = function( _
The condition high !== high returns true, when high is NaN.I wonder why the jQuery guys did not used the much clear isNaN(high) function instead, but that was probably due to performance reasons as koopajah pointed out.
NaN (Not-a-Number) means a result that cannot be represented as a Number. It is an undeterminated number.
Why NaN === NaN returns false ?
Consider
0/0 = NaN
Math.asin(2) = NaN
You know that 0/0 is different than Math.asin(2), so why whould NaN be equal to NaN?