I am trying to write a Javascript function that takes an array, page_size and page_number as parameters and returns an array that mimi
array
page_size
page_number
Hey I'm sorry I'm a bit late but we can use the Array.splice(start, end) method except this is much simpler
Array.splice(start, end)
const page = 2 const step = 2; const start = page * step - step; const end = start + step; const array = [1,2,3,4,5,6] console.log(array.splice(start, end))