SOURCE

const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
const current = 2
const size = 2


let newArr = arr.filter((item, index) =>
    index < current * size &&
    index >= (current - 1) * size
)
console.log(newArr)














console 命令行工具 X clear

                    
>
console