Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = value; function addCommas(x) {
- return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
- }
- addCommas(num)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement