Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Two Dimenstional Arrays
what does the Array.length property returns in case of 2d arrays i know it returns the length but it is a bit confusing could some one explain please ?
Balazs Peak46,121 Points
Think of it like this: multi dimensional arrays are actually not multi dimensional, they are just "recursive".
A 2 dimensional array is an array of arrays. A 3 dimensional array is an array of arrays of arrays ... etc.
The length property returns the outer-most dimension's length.
the first dimension is the row you mean ??
Aha Thanks a lot i got it