parseInt Functions with a Radix

Tell us what’s happening:

Your code so far

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


Your browser information:

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

Link to the challenge:

your function always return NaN because you are always trying to parse the string "str" - there isn’t a variable you should use instead?

You may want to revisit the challenge Basic JavaScript: Passing Values to Functions with Arguments.