Answers for "HO TO Use Intl.NumberFormat() to Format Number With Commas in JavaScript."

2

format number with commas js

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

}
Posted by: Guest on December-10-2020

Code answers related to "HO TO Use Intl.NumberFormat() to Format Number With Commas in JavaScript."

Code answers related to "Javascript"

Browse Popular Code Answers by Language