Skip to content

Instantly share code, notes, and snippets.

@mkoryak
Created September 24, 2014 20:14
Show Gist options
  • Save mkoryak/bf32a6cb61c111b684ca to your computer and use it in GitHub Desktop.
Save mkoryak/bf32a6cb61c111b684ca to your computer and use it in GitHub Desktop.
currency format trick
"1234567890.34".replace(/\B(?=(\d{3})+(?!\d))/g, ",")
"1,234,567,890.34"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment