Basic JavaScript: Nesting For Loops HELP!

Tell us what’s happening:

i’ve just done this exercise but i don’t actually know what’s missing, as i can’t pass neither one point.

Your code so far


function multiplyAll(arr) {
var product = 1;
// Only change code below this line


 for(var i = 0; i < arr.lenght; i++) {
    for (var j = 0; j < arr[i].lenght; j++) {
      product *= arr[i][j];
    }
 }
// Only change code above this line
return product;
}


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

console.log(product);



Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36.

Challenge: Nesting For Loops

Link to the challenge:

You have lenght it should be length

1 Like