Use a função Parseint com um JavaScript Radix


function convertToInterger(myString) {

  return parseInt(myString, 2); // We convert this to base 2.
}

console.log(convertToInterger("10011")); // This is a binary number.
Tony Harris