Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

format number with commas js

foramtNumber = (num,div=",")=>{
  return num.toString().replace(/B(?=(d{3})+(?!d))/g, div);

}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #number #commas #js
ADD COMMENT
Topic
Name
5+8 =