Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!! This was also fun. I changed a decent amount, including removing entirely the initial dropdown list of airport codes as it was a horrible way to search for an airport. I added an input box with which a user can type in the city or code for an airport and autocomplete will display a list of matches while typing. Upon hitting the "Go!" button, a user is taken to the airport on the map where a marker with the airport code as a label is displayed. A user can then double click the marker to make it go away, or click the marker to view the airport data, displayed in a way that is much easier to read. I removed the table that previously displayed the data at the bottom. When the instructions are toggled off, the map is moved underneath the title of the page. I also sorted the list using Underscore.js's _.sortBy() method.
I loved working with this code. It taught me a lot more about JavaScript and I utilized some functionality from Underscore.js which was really cool. It was surprisingly simple to implement the autocomplete input box and connect it to the "Go!" button. For improvements, I could've made the layout a bit simpler or pretty. If I were to spend more time on this, I would work on making the page more responsive. I would also love to know how to write cleaner and more effective code, as I'm sure mine is relatively rough.
I feel that by adding the autocomplete input search box instead of using a sorted list of the airport codes I went above and beyond what was asked. It's much more user friendly by allowing a user to search by the code OR the city. Overall, I had a great time figuring out how to do this and I am happy with what I did!