Having a bit of trouble with the following task, which logs "1":
Create a function multiplyAll that takes an unknown number of integer arguments, multiplies them all together, and returns the result.
function multiplyAll(arr){
let product = 1;
for (let i=0; i<arr.length; i++){
product = product * arr[i];
}
return product;
}
console.log(multiplyAll(9, 4, 5, 6, 7, 2, 1, 8, 3)) // should log: 362880
console.log(multiplyAll(5, 5, 5, 3)) // should log: 375