+ 1
What is the use of isNaN function?
IsNaN function returns true if the argument is not a number otherwise it is false.
3 Respostas
+ 1
To check if an input is valid is one use.
+ 1
Examples:
isNaN(NaN) // true isNaN("string") //true isNaN("12") // false
isNaN(12) // false
0
It's correct. isNaN is a high level function and is not associated with any object. isNaN tries to convert the passed parameter to a number. If the parameter cannot be converted, it returns true; otherwise, it returns false.