Tell us what’s happening:
I’m completely lost on this one.
What is a radix?
What is the base of a number?
What does the following line mean?
The radix variable says that “11” is in the binary system, or base 2. This example converts the string “11” to an integer 3.
Your code so far
function convertToInteger(str) {
return parseInt(str, 2);
}
convertToInteger("10011");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
.
Link to the challenge: