isNaN()
20·6
2016
This simple function checks to see if something "is not a number". It returns true if the input is not a number.
isNaN(24) => False // 24 is a number
isNaN("cat") => True // "cat" is a string
isNaN("24") => False // "24", even though a string, is converted to a number by Javascript
isNaN(true) => False // true = 1
isNaN(NaN) => True // Not a Number is Not a Number ;)
isNaN(undefined) => True*
But...