DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
js insert a point each three digit
function formatNumber(num) { return num.toString().replace(/(d)(?=(d{3})+(?!d))/g, '$1.') }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#js
#insert
#point
#digit
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit