If you have a multi-dimensional array, you can use the same logic as the prior waypoint to loop through both the array and any sub-arrays.
Here is an example:
```
var arr = [
[1,2], [3,4], [5,6]
];
for (var i=0; i <arr.length;i++){
for (var j=0; j <arr[i].length;j++){
console.log(arr[i][j]);
}
}
```
This outputs each sub-element in <code>arr</code> one at a time. Note that for the inner loop, we are checking the length of arr[i], since arr[i] is itself an array.
<ul>
<li>Modify function <code>multiplyAll</code> so that it multiplies the <code>product</code> variable by each number in the sub-arrays of <code>arr</code>.</li>
<li>Make sure the second for loop is nested inside the first.</li>
</ul>
<strong>Relevant Links</strong>
<ul>
<li><ahref="https://guide.freecodecamp.org/certifications/javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array">Nest One Array Within Another Array</a></li>
<li><ahref="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop">Iterate Through An Array With A For Loop</a></li>
<li>We check the length of <code>arr</code> in the <code>i</code> for loop and the <code>arr[i]</code> length in the <code>j</code> for loop.</li>
<li>We multiply the <code>product</code> variable by itself because it equals 1, and then multiply it by the sub-arrays.</li>
<li>The two sub-arrays to multiply are <code>arr[i]</code> and <code>j</code>.</li>
</ul>
:clipboard: <strong>NOTES FOR CONTRIBUTIONS:</strong>
<ul>
<li>:warning: <strong>DO NOT</strong> add solutions that are similar to any existing solutions. If you think it is similar but better, then try to merge (or replace) the existing similar solution.</li>
<li>Add an explanation of your solution.</li>
<li>Categorize the solution in one of the following categories — Basic, Intermediate and Advanced. :traffic_light:</li>