DenisKarakchiev
9/5/2017 - 2:13 PM

format digit by splitting it each 3 digit with spaces #js

format digit by splitting it each 3 digit with spaces #js

function formatWithSpaces(num) {
    let options      = {
      style: 'decimal',
    };
    let numberFormat = new Intl.NumberFormat('ru-RU', options);
    return numberFormat.format(num);
  }