Appending items
Now we need to get the appendResults
function to do its job. Remember that this method is called every time we reach the bottom of the page.
What it should do is check if there are any more objects inside the results
array which have not yet been added to the products
array.
If there are, it should append the next 4 to the products
array. If there aren't, it doesn't need to do anything.
Click to load comments...