toLocaleString

let arr = ['12sf','sadfasf','2323dsdf'];
arr.toLocaleString();
返回结果是字符串。
'12sf','sadfasf','2323dsdf'
首先调用每个数组元素的 toLocaleString() 方法,然后使用地区特定的分隔符把生成的字符串连接起来,形成一个字符串。
原文地址:https://www.cnblogs.com/aiyr/p/9797998.html