Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] NaN
- From: javascript@xxxxxxxxxx (Peter Brunone)
- Subject: [Javascript] NaN
- Date: Wed, 20 Nov 2002 11:16:44 -0500
Iztok,
You are checking to see if x is equal to the string "NaN", which of course it never is. I'm not sure if you can use an equality to check for NaN, but the function isNaN(x) will return a boolean (true/false) value that you can use.
Cheers,
Peter
---------- Original Message ----------------------------------
From: "Iztok Polanic" <iztokp@xxxxxxxx>
Reply-To: javascript@xxxxxxxxxx
Date: Wed, 20 Nov 2002 11:43:47 +0100
>Hi!
>
>I was trying to catch NaN (Not a Number) via
>x = Number(something);
>if (x == "NaN") {
>...
>}
>and it does not work. Why? I'm using IE 6.0 and JS 1.5. Can somebody tell me
>what cained of error is IE 5.x throwing back to user?
>TNX!
>
>Bye,
>
>Iztok
>
>_______________________________________________
>Javascript mailing list
>Javascript@xxxxxxxxxx
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
- Prev by Date: [Javascript] NaN
- Next by Date: [Javascript] Selecting Day, month and year and getting it to work out the dayof week
- Previous by thread: [Javascript] NaN
- Next by thread: [Javascript] Help with Cookies!!
- Index(es):