About radix in parseInt() function

what do we mean by base of a string ?

parseInt('101', 10) // 101 in base 10 (decimal)
parseInt('101', 2) // 5 in base 2 (binary)
parseInt('101', 16) // 257 in base 16 (hexadecimal)
1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.