Access MultiDimensional Arrays With Indexes it is not working for e

Access MultiDimensional Arrays With Indexes it is not working for e
0.0 0

#1

Tell us what’s happening:

Whta should be done here

Your code so far

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

// Only change code below this line.
var myData = myArray[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/66.0.3359.139 Safari/537.36.

Link to the challenge:


#2

You need to change the line:

var myData = myArray[0][0];

so that it accesses one of the array elements that equals eight.

First of all, remember that arrays start counting with zero. So,

var myData = myArray[0][0];

is setting it equal to 1, the first element in the first subarray.

If we changed it to:

var myData = myArray[0][1];

we would be accessing the second element in the first subarray, or 2.

If we set it to:

var myData = myArray[1][2];

we would be accessing the third element in the second subarray, or 6.

What would have have to change it to to target that 8?