✅ – ✅ – blackhorseh – 17-53 Jul 21
Hey, guys, How to convert number 9700 to 9.7k ?
I know can convert it manually by dividing with 1000 and manipulate string to add
k
,
But Is there any javascript method to do easily? For example, 9700.toLocalString() = 9,7005 Replies
oh, found it myself.
toLocaleString('en-US', { notation: 'compact' })}
notation give me what I need. 🙂This question has an answer! Thank you for helping 😄
If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1132007474786996294
This question has an answer! Thank you for helping 😄
If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1132007474786996294
Intl.NumberFormat - JavaScript | MDN
The Intl.NumberFormat object enables language-sensitive number formatting.
This thread hasn’t had any activity in 36 hours, so it’s now locked.
Threads are closed automatically after 36 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1132007474786996294