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

See Also


Description

Converts String objects into integers.

Syntax

parseInt(numstring)

The numstring argument is a String object that contains an integer.

Remarks

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

You can test for NaN using the isNaN function.


© 1997 Microsoft Corporation. All rights reserved.