Sunday, July 17, 2011

Javascript - Why can't I get this Javascript as a number? It's coming up NAN?

You tried to parse a floating point number from a string that, as per a previous instruction, starts with the character '$'. That character isn't a valid part of a properly formatted floating point number, so parseFloat() returns the special floating point value NaN.

No comments:

Post a Comment