To add currency symbol along with an amount

let currencyTotal = 1000;

let curFormatter = format.getCurrencyFormatter({
    currency: "USD" // Code of the currency
});

let curSymbol = curFormatter.symbol; // '$'

let totalAmount : curSymbol+currencyTotal; // Displayed as --> $1000

Use N/format/i18n module to get format.getCurrencyFormatter(options).

Leave a comment

Your email address will not be published. Required fields are marked *