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.
ride share
Congratulations! You're submitting your assignment.
Comprehension Questions
max_by
method on the hash containing all drivers' total earnings, and the highest earning driver was stored in a variable to make it more convenient to print..map
? If so, when? If not, why, or when would be a good opportunity to use it?.each
iterations to gather the data, and used.max_by
for determining the highest rated and highest earning driver. I did use.map
, to output ride count, but now I realize it was unnecessary (and I will probably change it after I submit this :)) as it returns a new array. I didn't use.map
because my data structure and the ability to access that data is so heavily reliant on keys/values, I didn't see it necessary to add arrays using.map
.