This question has already been answered:
I get for example the number of 1,000,000 or 10,000 or any other. How can I convert them separated by 3 characters from the end point.
For example, 1000000 => 1.000.000 or 10000 => 10.000
This question has already been answered:
I get for example the number of 1,000,000 or 10,000 or any other. How can I convert them separated by 3 characters from the end point.
For example, 1000000 => 1.000.000 or 10000 => 10.000
A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .
Source: https://ru.stackoverflow.com/questions/792282/
All Articles
result = 1000000; result += ""; result = result.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1.')result = 1000000; result += ""; result = result.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1.')result = 1000000; result += ""; result = result.replace(/(\d)(?=(\d\d\d)+([^\d]|$))/g, '$1.')- Sergey Kozin