Hey there, I'm a beginner in JavaScript programming and could really use some guidance!
Check out this 3D array with dimensions 2 x 3 x 3:
"items": [ [ [1,2,3], [4,5,6], [7,8,9] ], [ [10,11,12], [13,14,15], [16,17,18] ] ]
My task is to add a new row like
[ [19,20,21], [22,23,24], [25,26,27] ]
at either index 1 or 2.
I attempted to use the splice function but had no luck.
Since it's a multi-dimensional array, I'm unsure what should be placed in the itemN parameter of the splice function.
items.splice(insertIndex, 0, `????`);
Any advice on how to achieve this? Thank you!