+ 29

parseInt(readLine(), 10) What is its use?

Can someone explain.. Its JS.

12th Dec 2020, 3:30 AM
Surabhi S
Surabhi S - avatar
11 Respostas
+ 128
readLine() means it'll take users input parseInt() means it'll convert the String into Integer parseInt uses two parameters, second one is optional. Two parameters are: parseInt(String, Radix) The radix parameter is used to specify which numeral system to be used, for example, a radix of 16 (hexadecimal) indicates that the number in the string should be parsed from a hexadecimal number to a decimal number.
12th Dec 2020, 4:46 AM
Samiun Nafis
Samiun Nafis - avatar
+ 3
Thanks
16th Sep 2021, 12:11 PM
Immaculate Prince
Immaculate Prince - avatar
+ 1
Thank youuuu!!!!!
20th May 2021, 3:48 PM
Stock
+ 1
thanx for your kind explanation!
9th Jan 2022, 7:29 AM
Mulualem Adisu
Mulualem Adisu - avatar
+ 1
readLine() means it'll take users input parseInt() means it'll convert the String into Integer parseInt uses two parameters, second one is optional. Two parameters are: parseInt(String, Radix) The radix parameter is used to specify which numeral system to be used, for example, a radix of 16 (hexadecimal) indicates that the number in the string should be parsed from a hexadecimal number to a decimal number.
12th Oct 2022, 7:51 AM
Dasari Aarthi
0
Very helpful. thanks.🙌
18th Mar 2022, 9:21 PM
Gilbert Quaye
Gilbert Quaye - avatar
0
Great!.
11th May 2022, 1:07 AM
Nelson Aurelio Cardona Ibarra
0
thanks
7th Aug 2022, 11:50 PM
Malika HOUSNI
0
thank you so much!
21st Sep 2022, 6:59 PM
Mehmet Bulut
Mehmet Bulut - avatar
0
Thank bro that was confusing function in JavaScript!
3rd Nov 2022, 8:05 AM
Mulualem Adisu
Mulualem Adisu - avatar
0
but what if the readLine returns an error message that says is not defined. where to define it
20th Nov 2023, 9:29 AM
Samson M Nkosi
Samson M Nkosi - avatar