isNaN(123);//false
isNaN('123');//false
仅有的幸福2017-06-12 09:31:47
NaN
refers to Not-a-Number, isNaN()
, if it is NaN
, it returns true
.
Then 123
is not NaN
, of course it returns false
.
'123
' is type converted to Number type 123
, so it returns false
.