Simple array syntax in js

Simple array syntax in js
0

#1

what does a[2][0] mean?

element 2 times element 0??

var a = [1,"2",[3]];

a.length; //3
a[0]; //1
a[2][0]; //3

#2

Element 0 of the array in element 2 of the initial array.


#3

the 1st element inside the 2nd element of a

is that correct?


#4

The third element in the array a is another array (you can check this and this challenge for more on that), a is called a multi-dimensional array here, because it has another array inside it.

a[2][0]; is used to access an element in an array inside an array (a multi-dimensional array).


#5

thanks for the link!