isNaN(x)
How to check for numeric values and non-numeric - try
isNaN
(x).
NaN
being short for
N
ot
a
N
umber:
alert(isNaN("Frank"))
;
//
returns
true
alert(isNaN(10))
;
//
returns
false
alert(isNaN("10"))
;
//
returns
false