Thanks, @Vumbhoni! This guy has brought me back to high school right at 00:54 about 10 years ago, I was not very good at math, anyway. His tutorials are helpful and understandable.
Thank you for your explanation, @anon10002461!
And I’m really sorry, guys! I posted incorrect code instead of the correct one(example code) below. I just want to understand every single line of code but accidentally messed up.
function multiply(arr, n) {
if (n <= 0) {
return 1;
} else {
return multiply(arr, n - 1) * arr[n - 1];
}
}