parseInt

IMPORTANT!  
Starting with v24.3, this is deprecated.

Converts a string to an integer in the specified base.

Syntax

function parseInt(number: string, baseValue: number): number
 
Parameter Description
number String containing the number in text format.
baseValue Value between 2 and 36 representing the base of the number. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.

Return Value

Returns the numeric integer data type representation of the string.

Examples