Getting only currency symbol based on Intl.NumberFormat or similar


This Content is from Stack Overflow. Question asked by user19697663

I was wondering if there is an Intl.NumberFormat option or something similar, that just returns the currency symbol based on a given input.

let formatted = (new Intl.NumberFormat('en-EN', { style: 'currency', currency: 'EUR' }).format(1)) 
//=> returns 1.00 €
//=>what I would need, just => €

Thanks for reading!


This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?