DEV Community

Discussion on: isNaN('') = false 😅, how to handle it?

Collapse
 
robotmayo profile image
Robotmayo

Whats happening is you are misunderstanding what isNaN does. It does not check if the value passed is or isn't a number, it only check if the value is the global constant NaN