📜  javascript number to number with commas - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:06.884000             🧑  作者: Mango

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

}