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.
Using object instead of an array, this way you won't need any of the helper functions or any of the adjustments in other files. Furthermore, you avoid digging yourself into a hole(a possible future mistake) when you use object keys instead of array indexing. I hope you can see what I am trying to do here. I was indeed surprised when I saw when you used an array. Also, the helper functions, even though I know what they do, in the future when someone else try to understand this code, it would require whomever reads this code to go around an additional circle to understand the code, instead of the directness of not using helper functions. So maybe helper functions are not always as helpful, sometimes they can be counter-helpful and make the code more confusing harder to understand.