Use the parseInt function with a Radix - solved but have a question

Tell us what’s happening:
I understand that I used 2 because the problem said to convert the binary number into an integer. When would I use any of the other numbers (2 - 36)? What would a problem look like that required the use of 19 or 36 (just random numbers other than 2) as the radix?

  **Your code so far**

function convertToInteger(str) {
return parseInt(str, 2)

  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62

Challenge: Use the parseInt Function with a Radix

Link to the challenge:

8 and 16 are common (often used as more compact versions of binary numbers).

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