Use the parseInt Function with a Radix(SOS)

Tell us what’s happening: I am having troubles understanding what im doing incorrectly

Your code so far

function convertToInteger(str) {
 var a = parseInt("10011", 2); 
return a;


Your browser information:

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

Link to the challenge:

You need to pass the str variable from the function into the parseInt and you shouldn’t have had to change the argument converToInteger() started with.

This code should work:

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