I took a somewhat circuitous route on this challenge because I decided to use the wikiquotes API to pull quotes. Because the API isn’t the most friendly thing and the formatting is less than uniform, it took a bit of work to get what I wanted out of the code. I had to fetch random letters, then random names, then finally random quotes.
Although I needed one value to start the next request, I can only fetch them asynchronously. I had to write them as named functions and nest them. It resulted in a lot of nesting and anonymous functions calls and looks generally kind of messy. I’ve yet to style the interface because most of the time was sunk into figuring out how to use the wiki API.
I’ve little exposure to asynchronous functions, so I’m unsure if I’m doing this the right way. I consulted some articles and books, but I’d like some feedback on the code and if there are better ways to do this.