Add Commas | JavaScriptSource

Add Commas

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

The JavaScript Source: Text Effects: Add Commas

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(
0 comments)