Skip to content

Conversation

@msfinnan
Copy link

@msfinnan msfinnan commented Jun 3, 2019

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? It means that you can do multiple things at once in your program. In the case of this API project, you can interact with the webpage while waiting for the API call.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? The displayStatus function displays a status such as "Loading trips..." while the API call is being made.
What kind of errors might the API give you? How did you choose to handle them? An error could be a bad request error if the API is down, there is a bad path or bad payload. I chose to handle them with a function that parses and displays the API errors to the user.
Suppose you needed to routinely find a specific Trip in the list by it's ID field. Would it be advantageous to keep the list in order by the id field? Explain why or why not. This program does need to access trip by its ID to make the get request for trip details and the trips are displayed in order of ID. Maybe the was another way to do this that I did not try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant