Use the parseInt Function with a Radix struggle

Tell us what’s happening:
I don’t understand! How can I fix it?

Your code so far

function convertToInteger(str) {
  var convertToInterger = parseInt(str);
  return parseInt(str);


Your browser information:

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

Link to the challenge:

@zuc0n Both lines of your code do the same thing, so you’ll only need one of them. Then, your parseInt syntax isn’t correct for binary.

Here’s the example in the instructions to convert the string 11 to binary (11 is 3 in binary):

var a = parseInt("11", 2);

So, if one wanted to convert another string to binary, they could do something like:

var a = parseInt("<any_number_here>", 2)

Does that help?