Exercises
- Disable the Previous button if the user is on the first page and disable the Next button if the current listing has fewer than 10 records on display.
- Extract the
searchParams
function into a separate module that handles any number of parameters and uses theencodeURIComponent
JavaScript function to ensure the values are encoded correctly. - The
/customers
endpoint supports alimit
parameter that allows you to specify the maximum number of records that are returned. Provide a mechanism for the user to change the limit on each page.