Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivanmarkovich/dec01b91b996d7dbc6438097d0338fda to your computer and use it in GitHub Desktop.
Save ivanmarkovich/dec01b91b996d7dbc6438097d0338fda to your computer and use it in GitHub Desktop.
Разделение числа на тысячи пробелами
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment