Javascript Number toCurrency(precision)

Description

Javascript Number toCurrency(precision)

Number.prototype.toCurrency = function(precision) {
  if (precision === undefined) { precision = 2; }
  return '$' + insertThousandsDelimiters(this.toFixed(precision));
};



PreviousNext

Related