Created
November 29, 2021 13:16
-
-
Save kingisaac95/6851e8b0ad1ad527886872cced6d5c37 to your computer and use it in GitHub Desktop.
Add comma separation in numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const formatCount = (x) => x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment