使用join方式转字符串
const myArray = [1, 2, 3, 4, 5]; const stringFormat = myArray.join(','); console.log(stringFormat); // 输出: "1,2,3,4,5"
数组转字符串格式
于 2023-12-04 14:01:33 首次发布
使用join方式转字符串
const myArray = [1, 2, 3, 4, 5]; const stringFormat = myArray.join(','); console.log(stringFormat); // 输出: "1,2,3,4,5"