Course · Section 11: Working With Arrays · Lecture 156: Data Transformations: map, filter, reduce
Implement three cooperating helpers used to render a filtered, sorted, paginated list: - `filterItems(items, query)` keeps items whose `name` contains `query` (case-insensitive). - `sortItems(items)` returns a new array sorted by `name`. - `paginate(items, page, size)` returns the 1-indexed page slice.
+ 1 hidden test run on Submit.
Real list UIs compose filter, sort, and paginate. Keeping them separate, pure functions makes each testable and reusable.
Run your code to see results.