advanced code snippet search
visualadvance on 08/02/11
Adds commas every 3 spaces.
String (1000000).replace(/(\d)(?=(\d\d\d)+$)/g, "$1,");
Report this snippet
I looked for almost an hour for this! All that I could find were long functions that didn't work, this worked immediately, thanks!
You need to login to post a comment.