+ 3
JAVASCRIPT CHALLENGE QUESTION
Please why is the output of this code true? var x= Boolean(NaN===NaN) var y= Boolean(NaN===NaN) if(!x) alert(x===y) else alert(y)
1 Respuesta
+ 4
NaN means Not a Number.(can be anything but not a number) and cannot determined exactly. Then
x = false
y = false
!x is true
x===y =>false===false =>true