How can I check if a number is NaN?
if(nNumber == NaN){ } just doesn't work.
At 8/8/06 01:45 PM, YoBro wrote: How can I check if a number is NaN?
How can I check if a number is NotaNumber?
Does not compute.
At 8/8/06 01:45 PM, YoBro wrote: How can I check if a number is NaN?
if(nNumber == NaN){ } just doesn't work.
You could try: if(nNumber == "NaN"){ } (putting the NaN in quotes)?
Or: if(nNumber == undefined){ } (using undefined)
Hopefully one of those two methods work.
D:
At 8/8/06 02:20 PM, Fat_Lifeguard wrote: WHY THE HELL DID THAT TAKE HALF A DOZEN REPLIES TO FIGURE OUT?!?!?
None of us know what we're doing. Srsly, we don't. =/
At 8/8/06 02:27 PM, ViktorHesselbom wrote:At 8/8/06 02:20 PM, Fat_Lifeguard wrote: isNan(expression)Why do you write with capitals?
WHY THE HELL DID THAT TAKE HALF A DOZEN REPLIES TO FIGURE OUT?!?!?
Sorry, I just sometimes get upset when a proplem with an easy answer takes so many people to figure out.
And I made a typo: It should be isNaN(), not isNan().
At 8/8/06 02:33 PM, Fat_Lifeguard wrote: Sorry, I just sometimes get upset when a proplem with an easy answer takes so many people to figure out.
try not to get upset. just because you knew the answer 8 replies back doesnt mean everyone else did. in fact, they clearly didnt, since they were offering replies that were just attempted workarounds. if that is what it takes to make you upset, you should just leave before you ever get to 100 posts.
your help, though appreciated, is not required around here. if these fora are going to negatively affect your blood pressure, do everyone a favor and just disconnect your computer from the wall.