Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Use the parseInt Function with a Radix Javascript


function convertToInterger(myString) {

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

console.log(convertToInterger("10011")); // This is a binary number.
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #Use #parseInt #Function #Radix #Javascript
ADD COMMENT
Topic
Name
9+3 =