/ Published in: JavaScript
Expand |
Embed | Plain Text
// "1234567".commafy() returns "1,234,567" String.prototype.commafy = function() { return this.replace(/(.)(?=(.{3})+$)/g,"$1,") }
You need to login to post a comment.
