0 points

formatting - How to print a number with commas as thousands separators in JavaScript - Stack Overflow


dashboard

Fri May 08 2020 15:00:51 GMT+0000 (UTC)

Posted by @merakireal #javascript

var n = 34523453.345
n.toLocaleString()
"34,523,453.345"

                                
content_copy Copy

https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript