Add Commas

Modifies a number by adding commas after every third digit. For example, 123456789 is converted to 123,456,789. The script example shows this JavaScript as used on numbers of various sizes. And, it demonstrates a clever use of the modulus operator.


Sampled by JavaScriptBank.com



Over 2000+ free Javascript
at JavaScriptBank.com Website