text: function currencyFormatter(separator, symbol, symbolFirst, value) {
      let result = Math.trunc(value) + separator;
      result += value.toFixed(2).substr(-2, 2);
  
      if (symbolFirst) {
          return symbol + ' ' + result;
      } else {
          return result + ' ' + symbol;
      }
  }
  
  // only getDollarFormatter function must be copy and paste in Judge !!!
  function getDollarFormatter(formatter) {
      return function (value) {
          return formatter(',', '$', true, value);
      }
  }
  
  const dollarFormatter = getDollarFormatter(currencyFormatter);
  const str = dollarFormatter(100);
  console.log(str);