Return to Snippet

Revision: 58561
at July 21, 2012 02:08 by rg443


Initial Code
Number.prototype.format = function () {
    return this.toString().split( /(?=(?:\d{3})+(?:\.|$))/g ).join( "," );
};

Initial URL

                                

Initial Description
format numbers in javascript with group digits

Initial Title
format numbers in javascript with group digits

Initial Tags
javascript, number, format

Initial Language
JavaScript