目录

How do I set numbers to be displayed with currency separators?

You can use NumberFormat() to set the number format to be displayed.

let numberFormat = new Intl.NumberFormat('zh-CN');
console.info(`numfmt: ${numberFormat.format(1000000)}`);

Reference

NumberFormat