Advertisement
robertvari

Format price

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