Any comparison with NaN is always false:
We can match the default value with the related data type. But in Number data type NaN(Not A Number) is the default value. But matching the NaN with Default Number value rise the “error – Ilogical comparison with NaN”.
//NaN is the default value of the Number Data Type
private var myNumber:Number;
private function checkType():void{
//if(myNumber==NaN){ outPut //error – Ilogical comparison with NaN
if(isNaN(myNumber)){
trace(myNumber) //NaN
}
}