Reputation: 3018
I'd like to test some functions in my browser but don't know where to switch the settings so that the decimal mark changes.
(1.53).toLocaleString()
returns 1,53 (e.g I'd like to see the US version 1.53)
In windows I already changed the decimal mark under region and language but it doesn't seem to affect the browsers. Any ideas?
Upvotes: 0
Views: 549
Reputation: 23406
Pass locales
argument ("a string with a BCP 47 language tag, or an array of such strings") to toLocaleString
:
console.log((1.53).toLocaleString('en-US'));
Upvotes: 1