mysteryEnvelope should be an object
jsphpl opened this issue · 2 comments
jsphpl commented
Bad design:
mysteryEnvelope[0].first_name // how should the reader know the zeroth element is a person??
Better design:
mysteryEnvelope.suspect.first_name // obvious
Students of mine intuitively returned an object from pickMistery()
and it took them a while to understand that an array was expected.
stale commented
This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stale commented
This pull request is closed. Thank you.