I have an array with multiple arrays inside. I would like to multiply the contents of each array.
Here is my code–currently not getting anything in console.
The desired output is 3 numbers– the result of multiplication of the three arrays
var arr = [
[1, 2, 3],
[3, 4],
[7, 8, 9]
]
var mult = 1
for (i = 0; i < arr.length; i++) {
for (j = 0; j < arr.length; j++) {
mult *= arr[i][j]
}
console.log(mult)
}