-
Notifications
You must be signed in to change notification settings - Fork 47
Pushpa_Agr_Edges #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Pushpa_Agr_Edges #22
Conversation
… forms accurately sends data back to make a successful reservation
TREKWhat We're Looking For
Good work, Pushpa. Your project works and meets the requirements and works pretty well! There are a few concerning choices about some ways you approached the problems... While your code does work, I have concerns about the use of global variables. Also, your form disappears when I look at every-other trip...! Ahhh!! I've left a few comments. This being said, you did pretty okay on this. |
| @@ -0,0 +1,129 @@ | |||
| //wave 1 | |||
| const URL = 'https://trektravel.herokuapp.com/trips'; | |||
| let currentTripID = 0; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're putting the currentTripID in this global scope in order to store what the current trip is... You should consider different approaches to get the value of currentTripID. Could you use a closure or read from the HTML?
| loadTripDetails(`${trip.id}`) | ||
| }); | ||
| trips.on("click", function() { | ||
| $("#addForm").toggle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using toggle() here produces a bug: When I click to view other trips, then the form hides, until I click again. It makes it unusable to reserve more than one trip!
|
|
||
| //wave 2 | ||
|
|
||
| const URL1 = 'https://trektravel.herokuapp.com/trips/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this variable and the above variable URL? They're not different! Why can't you reuse it? Even if they were different, could you use a different variable name besides URL1 that is more descriptive? Also, we like declaring global variables at the top of the file, otherwise they get lost.
TREK
Congratulations! You're submitting your assignment!
Comprehension Questions
Tripin 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.