Programming-Idioms

History of Idiom 22 > diff from v62 to v63

Edit summary for version 63 :
New JS implementation by user [otonashinotachi]

Version 62

2017-02-02, 21:01:40

Version 63

2017-04-05, 10:44:11

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Illustration

Idiom #22 Convert string to integer

Extract integer value i from its string representation s (in radix 10)

Illustration
Extra Keywords
int base conversion
Extra Keywords
int base conversion
Code
i = parseInt("23", 10)
Comments bubble
parseInt(string, radix);
Radix is an integer between 2 and 36 that represents the radix of the above mentioned string.
Doc URL
https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Global_Objects/parseInt
Origin
https://www.w3schools.com/jsref/jsref_parseint.asp