📌  相关文章
📜  javascript 如何获取子数组 - Javascript 代码示例

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

代码示例2
const ar  = [1, 2, 3, 4, 5];

// slice from 1..3 - add 1 as the end index is not included

const ar2 = ar.slice(1, 3 + 1);

console.log(ar2);