问题
数组与字符串之间的转换
分析
1. 数组转字符串
[1907244731828977664,1907244732118384640] 转换为
“1907244731828977664,1907244732118384640”
let str = "1907244731828977664,1907244732118384640";
let arr = str.split(',');
console.log(arr);
2. 字符串转数组
"1907244731828977664,1907244732118384640" 转换为 [1907244731828977664,1907244732118384640]
let str = [1907244731828977664,1907244732118384640] ;
let arr = str.join(',');
console.log(arr);