toLocaleString(locales, options) code example
Example 1: toLocalString
Data.prototype.toLocaleString()
Example 2: tolocalestring javascript currency fixing 2 decimal places
var num = 2046430.123;
num.toLocaleString(undefined, {
minimumFractionDigits: 2,
maximumFractionDigits: 2
}) // 2,046,430.12