Pagination:

Of course, there are more than ten characters in the Star Wars films, but our table is only showing ten. This is because the API is using pagination as such at the end of each link: /people/?page=1/.

So how do we add pagination to the table?

First, here is the code as it is at the moment:

To start, we need to modify writeToDocument() once again:

Now we insert another function just before writeToDocument() that inserts the "Next" and "Previous" buttons:

Our entire code now looks like this: