Basic Data Structures - Create complex multi-dimensional arrays

Hello, I wonder if anyone can help me with this…
I tried to replace the NestedArray[1][2] to [“deep”, [“deeper”, [“deepest”]]]; so i can meet the critiria of deep on third layer /deeper on forth layer/ deepest on fifth layer

However when i console.log the Nested Array : inside of forth array show Object and it doesn’t pass.

Is there anyway i can use the array index to replace element and also add 3 more layer of array?
Thanks

Your code so far

let myNestedArray = [
  // Only change code below this line
  ['unshift', false, 1, 2, 3, 'complex', 'nested'],
  ['loop', 'shift', 6, 7, 1000, 'method'],
  ['concat', false, true, 'spread', 'array'],
  ['mutate', 1327.98, 'splice', 'slice', 'push'],
  ['iterate', 1.3849, 7, '8.4876', 'arbitrary', 'depth']
  // Only change code above this line
];
// I try to nest "deep" to third layer, and deeper to forth; deepest to fifth layer in the same time. 

myNestedArray[1][2] = ["deep", ["deeper", ["deepest"]]]; 



Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0

Challenge: Basic Data Structures - Create complex multi-dimensional arrays

Link to the challenge:

You don’t want to add any new lines of code. You want to modify the existing code above the comment that says // Only change code above this line.

You have the right idea, you just need to make changes to the existing code.

Thank you so much. I read the instruction over and again can’t believe I missed that!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.