Access MultiDimensional Arrays With Indexes help

Tell us what’s happening:
i have no idea how to make the value of “myData” equals to 8 please can anyone help me with it?

Your code so far

// Setup
var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];

// Only change code below this line.
var myData=[0][0];

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/access-multidimensional-arrays-with-indexes

Greetings
To get 8 use myArray[2][1].
myArray has four members which are also arrays, remember arrays index starts from Zero(0),
the number 8 is the second[1] member of the third[2] array

2 Likes

Wow, thank you it took long enough to think about it

1 Like