Can any one tell me what's wrong with this code. Error getting arr[i] is undefined why? I am totaly confused

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

// Modify values below to test your code

Look at your second for loop.
Pay attention to the variable :slight_smile:

1 Like

Sorry i am idiot. I have to replace i++ with j++. Thanks