Skip to content

Instantly share code, notes, and snippets.

@thirdj
Last active December 11, 2015 14:59
Show Gist options
  • Save thirdj/4618056 to your computer and use it in GitHub Desktop.
Save thirdj/4618056 to your computer and use it in GitHub Desktop.
1000 comma
// 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