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 trial

JavaScript JavaScript Loops, Arrays and Objects Tracking Data Using Objects Review Loops, Arrays, and Objects

David Tidmarsh
David Tidmarsh
10,035 Points

"A two-dimensional array is an array of objects."

The quiz says the answer here is false, but aren't arrays objects? So a 2D array is an array of objects, which happen to be arrays.

I'm currently in the middle of the JavaScript lesson but from my understanding is that a 2D array (arrArray example below) are a list of items. kind of like an html unordered list. It doesn't have to have any particular meaning unless you code it that way. and an array of objects is kinda of the same thing but you have properties and values. (arrObject example below).

var arrArray = [
   ['apples', 24, true],
   ['oranges', 16, false]
];

var arrObject = [
   { property: 'value' },
   { color: 'red'}
];

notice the 2D array has " [ " " ] " while object arrays have " { " " } ".

David Tidmarsh
David Tidmarsh
10,035 Points

Martin Hernandez I understand the difference, but my point is that an array is a special type of object, just like a String object is a special type of object. I think this was mentioned in a different video I've watched on here. In my opinion the wording of the question is misleading and should be changed.