Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTom Hudock
855 PointsObjects holding a group of objects?
I'm a bit confused by this video. Alena says an object can hold a group of objects. But it seems like the "group of objects" is simply an array being stored within a single object.
Can someone please clarify what she is talking about when she says an object can hold a group of other objects and whether the group of objects is actually just an array being stored within a single object?
Thanks.
Daniel Li
15,244 PointsDaniel Li
15,244 PointsThink about it this way a folder is an object to hold sheets of paper (other objects) which is true of plain arrays too. But with the folder as an object you can write custom method to extend its functionality. I.e. a custom sort method to sort papers in order etc.