一 将数组转换为用逗号分隔的参数序列
let turtles = ['Leo','Raph','Mikey','Don'];
console.log(...turtles);
二 在解构赋值时使用
let turtles = ['Leo','Raph','Mikey','Don'];
let [first,second,...others] = turtles;
console.log(first,second,others);
2022-11-19 13:54:17
let turtles = ['Leo','Raph','Mikey','Don'];
console.log(...turtles);
let turtles = ['Leo','Raph','Mikey','Don'];
let [first,second,...others] = turtles;
console.log(first,second,others);