Skip to content

Format numbers with thousand seperator

In most web sites and applications, you’ll find yourself with the task or formatting large numbers properly. With the following snippet, this can be done easily:

You can replace the "," comma with a seperator of your liking.

[sc name=”src” url=”https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript” ]

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.