//Value being parsed at this point is "150.00" var productValue = parseFloat($("#product-cost-value-value").text().replace(',', '.')); console.log(productValue);
The recorded value is 150 .
However, if I add some value to it, for example. The value will change to display the two decimal places I want.
console.log(productValue + 0.01);
Recorded Value: 150.01
How can I make my values show two decimal places at once?
source share