Just curious as to why isNaN('-10')
is false? I was thinking isNaN('-10')
should be true, but isNaN(-10)
should be false?
Does Javascript try to convert strings to numbers before applying isNaN
?
isNaN
implicitly converts to Number type. Link