get 3 decimal places of number function in node js code example
Example: javascript round to 2 decimal places
var subTotal="12.1345";// can also be int, float, string
var subTotalFormatted=parseFloat(subTotal).toFixed(2); //"12.13"
var subTotal="12.1345";// can also be int, float, string
var subTotalFormatted=parseFloat(subTotal).toFixed(2); //"12.13"