Hi guys, I’m doing JavaScript course and I’m a little confused about these concepts. What’s the difference between a multi-dimensional array and a nested array?
Can you give an example of what you mean? Javascript implements multi-dimensional arrays as nested arrays, AFAIK.
Yeah, a multi-dimensional array is an ‘array of arrays’ which is an example of nested arrays. In this case, you have an array of objects, and one of the object properties is itself an array.
You’ll see terms like “multi-dimensional array”, “jagged array”, “nested array”, and “n-dimensional array” used semi-interchangeably. You might encounter people who refer to the parent array as “multi-dimensional” and then the array elements as “nested arrays” or “sub-arrays”. Programming jargon is very amorphous .
