📜  javascript 切片数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:31.327000             🧑  作者: Mango

代码示例6
let numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let newArray = numbers.slice(4,8);
console.log("The sliced arrays is:", newArray)

// Output: The sliced arrays is: [ 5, 6, 7, 8 ]