Advertisement
fadlyshafa

Untitled

Sep 18th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function numberWithCommas(x) {
  2.     return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ".");
  3. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement