I am trying to round to two decimal places in my code below, however, in many cases the Math Round method to control the number of decimal places does not work for me.
var newKitAmount = 1;
var priceNumber = 168;
var updatedTotal = Math.round(priceNumber * newKitAmount*100)/100;
alert("total is : " + updatedTotal); //OUTPUTS 168 instead of 168.00
Output generated:168
Desired output:168.00
Example two:5 * 2 = 10
Desired output:10.00
What am I doing wrong? How can I fix it?