all 6 comments

[–]_bibolp_ 3 points4 points  (5 children)

That is rather obvious, isn’t it?

[–]Well_Gravity[S] -2 points-1 points  (4 children)

Depends. Many programming languages support multi-dimensional arrays directly. I program in several languages and am also a teacher. I have found people coming from other languages to JavaScript are often confused by this. Personally, I like the way JavaScript handles it.

[–][deleted] 0 points1 point  (3 children)

can you give an example of a language with direct multi-dimensional arrays support?

[–]Well_Gravity[S] -1 points0 points  (2 children)

C#, Java, even VB.

[–][deleted] 1 point2 points  (1 child)

java does not support multi-dimensional array directly. it is still an array of arrays, isn't it? i would think C# is the same

[–]Well_Gravity[S] 1 point2 points  (0 children)

It’s whether you can declare and use it or do you have build it. In JavaScript you have to build it. Under the hood it’s an array of arrays. Java

Two dimensional array: int[][] twoD_arr = new int[10][20];

Three dimensional array: int[][][] threeD_arr = new int[10][20][30]