var binary = "1101000";
var digit = parseInt(binary, 2);
console.log(digit);
var digit = parseInt(binary, 2);
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