Open diveDylan opened 4 years ago
// case 1 12345 ==> 12, 345 const formatNumber = number => String(number).replace(/\B(?=(\d{3})+(?!\d))/g, ',') // case 2 12345 ==> 12, 345 const formatNumber = number => number.toLocaleString('en-US')
数字格式化