https://twitter.com/wesbos/status/966697179904651264
toLocaleString()
方法我的理解是用于返回某语言系统下数字的表示字符串。如上推图片展示:
第一个参数为语言标识。参数值参考:https://tools.ietf.org/html/rfc5646#appendix-A
第二个参数为一个参数对象,可以设置为货币显示,如推文图片;对于货币currency
参数可选值参考:https://www.currency-iso.org/en/home/tables/table-a1.html