Adding thousands separator to variable with a period in its name in Javascript

Hope it will help you:

var n = 1123456789.123
n.toLocaleString()
"1,123,456,789.123"

See more: toLocaleString

  1. You can use: Numeral.js – it is very powerful

And: in the future, you really research and try again and again.

Thanks

Leave a Comment