Formatting numbers is not that easy (on the eyes)...
On yesterday's unauthorized and rum-fueled treasure hunt, we celebrated passing 25000 unfollows facilitated with Prune your Follows!
We did this by attempting to format the number 25000 into something a little more readable. All of the surrounding text is English, so it feels correct to use "en" as the locale:
const number = 25000; number.toLocaleString("en"); // Result 25,000
However, the result did not look good to me, so I did a quick and dirty:
const number = 25000; number.toLocaleString("en").replace(",", ""); // Result 25 000
But then, after the stream, I got convinced it might just be my sensible Norwegian eyes not handling something so unfamiliar.
What do you think?
If you think space, how bad would it be to make it happen by forcing Norwegian formatting using "no" as the locale?
const number = 25000; number.toLocaleString("no"); // Result 25 000
All the best,