Отделяем разряды числа

.toString().replace(/(\d)(?=(\d{3})+([^\d]|$))/g, “$1.”)

Comments are closed.