JS NUMBER 2 Tempat Desimal
(3.141596).toFixed(2); // 3.14
garzj
(3.141596).toFixed(2); // 3.14
var myNumber=12.2345;
var myNumberWithTwoDecimalPlaces=parseFloat(myNumber).toFixed(2); //12.23
var myNumber = 2;
myNumber.toFixed(2); //returns "2.00"
myNumber.toFixed(1); //returns "2.0"
var discount = Math.round((100 - (price / listprice) * 100) * 100) / 100;