convertir binario a decimal javascript
var digit = parseInt(binary, 2);
1337
var digit = parseInt(binary, 2);
var binary = "1101000";
var digit = parseInt(binary, 2);
console.log(digit);
let binary = 0001
parseInt(binary, 2)
// returns 1
var binary = "1101000" // code for 104
var digit = binary.toString(10); // Convert String or Digit (But it does not work !)
console.log(digit);
Run code snippet