SOURCE

let a = "1,22,333";
let b = a.split(",")
//字符串转数组,不改变原先
console.log(b);
//字符串转数组,不改变原先
console.log(b.join("#"));
let c = [1,2,3,4,5,6,7,8];
console.log(c.splice(1,2));
//改变原数组,从下标1截取长度为2
console.log(c);
let d = [1,2,3,4,5,6,7,8];
console.log(d.slice(1,2));
let e = d.slice(1,2);
//不改变原数组,从下标1截到下标2不包括下标2
console.log(e);
console 命令行工具 X clear

                    
>
console