Hi all. I’ve trying to create a function that multiply an array of numbers, but I can’t see what is wrong with my code.
Please check my code:
function multiply(numbers) {
let product = 0;
for (let number of numbers) {
product += number;
}
return product;
}
console.log(multiply([2, 3, 4]));
Is there any bug on my code, @Grasshopper_Ben? Please reply to my post @Grasshopper_Ben.
Best,
@Pummarin_The_gamer