Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Use parseInt() in the convertToInteger function so it converts a binary number to an integer and returns it.

function convertToInteger(str) {
  return parseInt(str, 2);
}
 
PREVIOUS NEXT
Tagged: #Use #convertToInteger #function #converts #binary #number #integer #returns
ADD COMMENT
Topic
Name
8+4 =