JavaScript mengubah string menjadi 2 desimal
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Worried Wombat
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
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