ironhack-labs/lab-javascript-clue

mysteryEnvelope should be an object

jsphpl opened this issue · 2 comments

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.