toLocaleString 2 decomal points code example
Example 1: tolocalestring javascript currency fixing 2 decimal places
var num = 2046430;
num.toLocaleString(undefined, {minimumFractionDigits: 2}) // 2,046,430.00
Example 2: tolocalestring javascript currency fixing 2 decimal places
var num = 2046430.123;
num.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2
}) // 2,046,430.12