Basic Data Structures - Create complex multi-dimensional arrays

Tell us what’s happening:
i’ve been testing this solution with console.log but cannot pass, can someone review my code? thanks

output from console log :
[ ‘unshift’, false, 1, 2, 3, ‘complex’, ‘nested’ ]
[ [ ‘loop’, ‘shift’, 6, 7, 1000, ‘method’ ] ]
[ [ [ ‘concat’, false, true, ‘spread’, ‘array’ ], ‘deep’ ] ]
[ [ [ [Object], ‘deeper’ ] ] ]
[ [ [ [Object] ] ] ]

  **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'],'deep']],
[[[	['mutate', 1327.98, 'splice', 'slice', 'push'],'deeper']]],
[[[[	['iterate', 1.3849, 7, '8.4876', 'arbitrary', 'depth'],'deepest']]]]
// Only change code above this line
];

console.log(myNestedArray[0]);
console.log(myNestedArray[1]);
console.log(myNestedArray[2]);
console.log(myNestedArray[3]);
console.log(myNestedArray[4]);
  **Your browser information:**

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

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

Link to the challenge:

Hey! Welcome to the freeCodeCamp’s community forums.

Learning to describe the bugs or issues you’re facing is a great skill to have in a developer, it may seem hard at first, but you should at least provide a brief summary of what you are trying to accomplish and what’s the error that shows up when you try to run your code.

You can add any and all of the questions that you might have in the following section

Tell us what’s happening:

It will also make it easier for others to help you if they know the problem beforehand.


it seems you have an extra level of depth than needed

okay, i’ve done it . thank you

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