Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Use the parseInt Function with a Radix

function convertToInteger(str) {

  var conversor = parseInt(str, 2);

  return conversor;

}

convertToInteger("10011");
 
PREVIOUS NEXT
Tagged: #Use #parseInt #Function #Radix
ADD COMMENT
Topic
Name
7+4 =