JavaScript mengubah string menjadi 2 desimal
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
Worried Wombat
var twoPlacedFloat = parseFloat(yourString).toFixed(2)
let money = 1.6;
money.toFixed(2); // 1.60
(Math.round(num * 100)/100).toFixed(2); // 1.346 -> 1.35