The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems). If the radix value (coerced if necessary) is not in range [2, ...
Use the parseInt Function with a Radix Code Explanation The function takes str and returns an integer instead of a string but “understanding” its a binary number instead of a decimal one thanks to the ...