способ вот тут
                  
                  
                  
                  
                  
                  https://stackoverflow.com/questions/149055/how-can-i-format-numbers-as-currency-string-in-javascript
                  
                  
                  
                  
                  
                  Number.prototype.format = function(n, x) {
                  
                  
                      var re = '\\d(?=(\\d{' + (x || 3) + '})+' + (n > 0 ? '\\.' : '$') + ')';
                  
                  
                      return this.toFixed(Math.max(0, ~~n)).replace(new RegExp(re, 'g'), '$&,');
                  
                  
                  };
                  
                  
                  
                  
                  
                  1234..format();           // "1,234"
                  
                  
                
спасибо
Обсуждают сегодня