I can`t explain my self how the function will procede arr[0][1]. Will be the inner loop be executed till end, until the outer loop changes to i = 1 ? If so, arr.length is 3, but the arr[0] has just 2 values. So j = 2 or 3 leads to what?
i is 0 so arr[0] is 1,2
j is 0
arr[0][0] is 1 so multiplying product by 1
j is 1
arr[0][1] is 2 so multiplying product by 2
i is 1 so arr[1] is 3,4
j is 0
arr[1][0] is 3 so multiplying product by 3
j is 1
arr[1][1] is 4 so multiplying product by 4
i is 2 so arr[2] is 5,6,7
j is 0
arr[2][0] is 5 so multiplying product by 5
j is 1
arr[2][1] is 6 so multiplying product by 6
j is 2
arr[2][2] is 7 so multiplying product by 7
for (var i = 0; i < arr.length; i++) {
// arr[i] returns arr[0], arr[1], arr[2], etc
for (var j = 0; j < arr[i].length; j++) {
// when i = 1, arr[1][j] returns arr[1][0], arr[1][1], arr[1][2], etc
// for every number arr[i][j] returns, perform a task
product *= arr[i][j];
// same as product = product * arr[i][j]
}
}