Looking for a little guidance on Nesting for Loops

Looking for a little guidance on Nesting for Loops
0

#1

EDIT: Ok so I typed greater than instead of less than, by mistake. Feel free to delete this thread if you like
:wink: Hi guys, so here’s what I have so far. I think I’m tackling the problem correctly, but for some reason I’m getting 1 out of this function no matter what. Could someone explain where I’m going wrong? I’d be very grateful. Thanks for your time! :slight_smile:

Your code so far

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

// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36.

Link to the challenge: