Now we can get to all the keys and their values, we need to display them in a table. We'll
start doing that here.
The code so far:
Between the two functions, we are going to create a new function called getTableHeaders(). It is within this
function that we shall start to build our table:
Now we need to invoke the table headers inside writeToDocument():
So lets now see the entire code blocks:
Our code now looks like this:
What we now need to do is create a new row for each entry of the table. We have the header in place, but we can no longer see
each entry (Luke Skywalker, C-3PO etc.) for each row. We do this within the function writeToDocument(type):
So the entire code now looks like this:
Now lets neaten the table, so it does not stretch out so much. WE'll add a couple of variables to writeToDocument(type):