Course · Section 11: Working With Arrays · Lecture 157: The map Method
Implement `pageNumbers(total, size)` returning an array `[1, 2, ...]` of page numbers needed to show `total` items `size` per page.
+ 1 hidden test run on Submit.
Math.ceil(total / size) is how many pages you need; Array.from({length: count}, (_, i) => i + 1) produces the 1-based page numbers.
Run your code to see results.