js数字每三位加逗号(1234567890123 to 1,234,567,890,123)

const num = 12345678
console.log(num.toLocaleString()) // 12,345,678

你可能感兴趣的:(js,js字符串)