Tell us what’s happening:
I made the code many times and its just like in the help video by now but it just dont match the expected result… can someone help me? I just dont know what is wrong on it
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;
}
// Modify values below to test your code
multiplyAll([[1,2],[3,4],[5,6,7]]);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
.
Challenge: Nesting For Loops
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops