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)