I created this app using the Trivia API. The idea behind the app is to practice retrieving data from an external API and render it to a browser.
-
The app displays a single question with a set of answer options to choose from.
-
Users can make their selection and will promptly receive feedback on their choice with a message.
-
Each time a user answers correctly, they earn a point which is displayed at the top of the quiz.
-
Whenever browser is refreshed or user clicks on the 'next question' button, a new randomly generated history question appears.
I reviewed the documentation and tested API calls with ThunderClient. Using computational thinking, I planned out the app's logic and broke down the project into smaller code components.
At the moment all the questions in the quiz are related to my favourite subject of history. In future, I would like to
- Allow users to select the quiz question category
- choose number of questions
I had alot of fun selecting illustrations for this app that reflect the theme of the project :) It also helped in deepening my understanding of fetch, async/await syntax and DOM manipulation. Looking forward to build this project in React!
HTML, CSS & JavaScript