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 sebhastian.com #
 
PREVIOUS NEXT
Tagged: #format #number #commas #js
ADD COMMENT
Topic
Name
3+2 =