Microsoft® JScript™
parseFloat Function
Language Reference |
Version 1 |

See Also


Description

Converts String objects into floating point numbers.

Syntax

parseFloat(numstring)

The numstring argument is a String object that contains a floating point number.

Remarks

The parseFloat function returns an numerical value equal to the number contained in numstring. If numstring cannot be successfully parsed into a floating point number, NaN (not a number) is returned.

You can test for NaN using the isNaN function.


© 1997 Microsoft Corporation. All rights reserved.