const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
const [a,b, ...arr] = list; // Change this line
return arr;
}
const arr = removeFirstTwo(source);
会返回arr [3,4,5,6,7,8,9,10]
js获取剩余数组中的参数
最新推荐文章于 2023-05-24 14:19:15 发布