Created
April 30, 2019 10:11
-
-
Save ivanmarkovich/dec01b91b996d7dbc6438097d0338fda to your computer and use it in GitHub Desktop.
Разделение числа на тысячи пробелами
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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