Skip to content

Conversation

@lauracodecreations
Copy link

TREK

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What does it mean for code to be asynchronous? It lets the user interact with the web as it waits for request/response.
Describe a piece of your code that executes asynchronously. How did this affect the way you structured it? When you click on a button, the website does not reload. For example, when you click on a trip, and the trip info shows to the right.
What kind of errors might the API give you? How did you choose to handle them? errors occur if require data is missing the data that is used to retrieve data from the API. I choose to handle them by letting the user know what is missing using errors.message.
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. If you want to improve time complexity, it will help to keep the list in order by id that way it stops looking once it has found it. It also depends on the search algorithm you are using to efficiently improve the code.


// this is the homepage! the trip will not be avaiable
$(document).ready(() => {
$('#load').click(loadTrips);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have a callback set for the submit button!

let num = tripData["id"]
console.log(num)
//POST https://trektravel.herokuapp.com/trips/1/reservations
let URL_R = URL + "/" + num + "/reservations"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this looks really promising!

@dHelmgren
Copy link

TREK

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good
Comprehension questions Good
Functionality
Click a button to load and view a list of trips Yes
Click a trip to load and view trip details Yes
Fill out a form to reserve a spot This isn't working because you never actually set the callback function for your submit button. See comments
Errors are reported to the user Yes
CSS is DRY and attractive, uses CSS Grid, flexbox, and/or Bootstrap Yes!
Under the Hood
Trip data is retrieved using from the API Yes
JavaScript is well-organized and easy to read Yes
HTML is semantic Yes
Overall Your answers show that you know what the goal of making an asynchronous site is, but it seems like you didn't check your work thoroughly enough this time. I think you met most of the learning goals, but you need to ensure that you are checking your work!

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.

2 participants