Use the parseInt Function with a Radix Help. Im lost

Tell us what’s happening:

I don´t know why it doesnt return numbers 19 and 57.

Your code so far

function convertToInteger(str) {
 var radix = 3;
 var str = parseInt("str",radix);
  return str;


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36.

Link to the challenge:

It’s because you are not passing the right arguments. The first argument that you are passing to parseInt is not the same as the argument that you passed to the outer function (instead of “10011”, it is the string “str”)

Also you are trying to convert it into a base 3 number system with radix = 3. You want to convert it to a base 2 number system because the function is passing in a binary base 2 string (radix =2).