Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Primitive Values
isFinite Function
Math Object
parseFloat Function
parseInt Function
FUNCTION: isNaN
isNaN
(testvalue)
The
isNaN
function is used to determine if the argument,
testvalue
, is a
NaN
.
A
NaN
, which means "Not-a-Number", is classified as a primitive value by the ECMA-262 standard and indicates that the specified value is not a legal number. The function returns
true
if the argument is not a number and
false
if the argument is a number.
The classic example of a
NaN
is zero divided by zero, 0/0.
Code:
document.write(isNaN("Ima String"))
document.write(isNaN(0/0))
document.write(isNaN("348"))
document.write(isNaN(348))
Output:
true
true
false
false
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information