JS-151-API
  • JavaScript Library
  • 02-DOM-Manipulation
    • Overview
    • DOM Explained
    • Example Setup
    • Selecting Elements
    • Events
    • Complete Example
  • 03-API Fundamentals
    • 0-Getting Started
      • Welcome
    • 1-Intro-To-APIs
      • Intro
      • Client
      • Requests
      • JSON
      • API Endpoints
      • Server
      • Response
      • Statelessness
      • REST
    • 2-Asynchronous-Programming
      • Intro
      • Callbacks
      • Promises
      • Promises Continued
      • Chaining Promises
    • 3-Fetch
      • Fetch Intro
      • Star Wars
        • Star Wars API
        • Star Wars Setup
        • Star Wars JS
      • Random Photo
        • Unsplash
        • Unsplash Setup
        • Unsplash JS
    • 4-Apps
      • 01-New York Times
        • 00-App Intro
        • 01-HTML/CSS/API Key
        • 02-Variables
        • 03-Event Listeners
        • 04-fetchResults
          • 01-fetchResults()
          • 02-preventDefault()
          • 03-fetch() method
          • 04-Dates
        • 05-displayResults
          • 01-Logging JSON
          • 02-Working with JSON
          • 03-Link Display
          • 04-Results Navigation
          • 05-Results Update
          • 06-Keywords
          • 07-Images
        • 06-Pagination
          • 01-Pagination Intro
          • 02-Pagination Functions
        • 07-Next Steps
      • 02-YouTube
        • html
        • youtube.css
        • youtube.js
      • 03-GoogleMaps
        • Setup
        • HTML and CSS files
        • API Key
        • JS Setup
        • Adding Your Location
        • Listeners
        • Custom Options
Powered by GitBook
On this page
  • PAGINATION
  • Example
  • Our App
  1. 03-API Fundamentals
  2. 4-Apps
  3. 01-New York Times
  4. 06-Pagination

01-Pagination Intro

Previous06-PaginationNext02-Pagination Functions

Last updated 7 years ago

PAGINATION

Pagination is the process of separating print or digital content into separate pages. For print documents and some online content, pagination refers to the automated process of putting in consecutive numbers to identify the sequential order of pages.

Example

A common example of pagination can be found in everyday email. Take, for instance, a random Gmail account:

Of course, to have 3,000 plus emails is crazy, but it would be horrible to have all of those displayed in a list of 3000 items. Pagination helps us with that. Instead, we just show the first 50 results.

Our App

In our NYT app, we are already only displaying the first 10 results from the results array. We just need to be able to add the navigation between the results. Let's do that next.

Screenshot