Displaying results for Wikipedia Viewer

Displaying results for Wikipedia Viewer
0.0 0

#1

I want to display one result at a time and create a “Next Result” button that will display the next result until there is no more results. I also want a previous button so that you can display the previous result. How would I do that?

Also, right now, it only displays the last result, rather than all of them. I want it to display the results in order of 1,2 ,3.,… not …,3,2,1.

The reason I’m going the route of displaying results one at a time is because I can’t get it to display more than one results at a time and I’m tired of trying right now, so I’m trying a different route, but for some reason it’s not working.

This topic may help clear up what I’m trying to do:
https://forum.freecodecamp.org/t/formatting-nested-json-arrays-from-wikipedia-api/191531/7

Here is my pen:
WikipediaSearch


Wikipedia Search Simple Pagination
#2

Solved it! I just over looked a small but important detail in the code.