This one says false
, meaning the ""
is a number:
alert(isNaN(""));
This one says NaN
, meaning the ""
is not a number and cannot be converted:
alert(parseFloat(""));
I was expecting the second code to convert ""
to 0
since ""
is a number when tested in IsNaN
but I was wrong! Am I getting crazy or I just missed something?