Last active
December 11, 2015 14:59
-
-
Save thirdj/4618056 to your computer and use it in GitHub Desktop.
1000 comma
This file contains 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
// 1000 단위 콤마 | |
function addThousandSeparatorCommas(num) { | |
return num.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