Skip to content

Instantly share code, notes, and snippets.

@hnagato
Created June 28, 2012 06:21
Show Gist options
  • Save hnagato/3009483 to your computer and use it in GitHub Desktop.
Save hnagato/3009483 to your computer and use it in GitHub Desktop.
3ケタ
Number.format = function(n) {
return String(n).replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment