dollarFormat

Formats a string in U.S. currency format. (For other currencies, use
LSCurrencyFormat or LSEuroCurrencyFormat.).

dollarFormat(number) → returns String

dollarFormat Argument Reference

number
Required

Examples sample code invoking the dollarFormat function


Format Positive Numbers

Dollar Format is about $, commas, and 2 decimal places

dollarFormat(1236598.2)

Expected Result: $1,236,598.20


Format Negative Numbers

Negative numbers appear with parentheses.

dollarFormat(-11.34)

Expected Result: ($11.34)


Fork me on GitHub