Fun with API

Press the button for an inspirational quote! Quotes provided from user SergeyWebPro on the freeCodeCamp forum


This is a regular fetch request wrapped in an async function. It returns a large array from the endpoint. Each index contains a quote and its author, and every time the "Inspire Me" button is pressed, a quote is chosen with a random number generator by selecting a random index from the array.

Press the button to recieve a joke from the API!


This API is free as well, and it comes with plenty of jokes. I use a simple fetch request without async/awit here. For the purposes of this demo, it seems to be a sufficient approach that causes no issues. API Source: https://official-joke-api.appspot.com/random_joke