Demo showing the use of currencyDisplay
The demo uses the `symbol` value. Note the different representation of the symbol depending on the locale.
by yochail
JavaScript
var spondoolies = 100000000000;
// "QR100,000,000,000" Symbol is QR in English
console.log(new Intl.NumberFormat("en", {
style: "currency",
currency: "AED",
currencyDisplay: "symbol"
}).format(spondoolies));
// "ر.ق. ١٠٠٬٠٠٠٬٠٠٠٬٠٠٠" Symbol is ر.ق in Arabic
console.log(new Intl.NumberFormat("ar", {
style: "currency",
currency: "AED",
currencyDisplay: "symbol"
}).format(spondoolies));