Nesting for loops problem

Hi, I tried to use the code suggested by the example but it fails to produce the desired result. Can someone give at least a hint about what I am doing wrong here?

Thx in advance

function multiplyAll(arr) {
  let product = 1;
  // Only change code below this line
for (let i = 0; i < arr.length; i++) {
  for (let j = i; j < arr[i].length; j++) {
    
    console.log(arr[i][j]);
   
  }
  
}
  // Only change code above this line
  return product;
}

multiplyAll([[1, 2], [3, 4], [5, 6, 7]]);

what is the desired result? you have not given any context here

It was the “Nesting for loop” exercise in the javascript module. Thank you anyway.

so that would the exercise in which you have to return the product of all the numbers?

where are you making the moltiplication?

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