Use the parseInt Function with a Radix prb

Use the parseInt Function with a Radix prb
0

#1

Tell us what’s happening:
where I can use the radix element ? because in the function they only mention the str.

Your code so far


function convertToInteger(str) { 
    return parseInt(str);
  
}

convertToInteger("10011");

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix


#2

@sojib-bd,

in the lesson they are referring to the radix base that can be an optional second argument to the parseInt method.


#3

what else should i write in the code?