HO TO Use Intl.NumberFormat() to Format Number With Commas in JavaScript. code example
Example: format number with commas js
foramtNumber = (num,div=",")=>{
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, div);
}
foramtNumber = (num,div=",")=>{
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, div);
}