let arr = [2,3,4,5,6,7,8]
multiply(arr, 3); // this is equal 2*3*4*5
multiply(arr, 2); // this is equal 2*3*4
// so you can say that line 2 is equal to below:
multiply(arr,2) * arr[3]; // this is equal (2*3*4) * 5

so you can do this various times.
but eventually it needs to stop
so you say that multiply(arr, 0) is equal to 1 (instead of an other function call) (and because 1 is the neutral number in multiplication as q * 1 === q for every number)

n is a number, and it is the index of the last number in the array that should be multiplied. It is also the second parameter of the function.

function muplitply(arr, n) {...} // see where n is defined?

I made the example with real numbers. In my example n is 4 and n-1 is 3
it says n and n-1 because that relationship is valid for any number

and I sayd a wrong thing before. multiply(arr, 0) would return arr[0]
you would need to return 1 only if n (second parameter of the function) would be less than 0

this could help you, try looking at the function in the challenge description with this tool: (remember you need also a function call to see the function executing) http://www.pythontutor.com/javascript.html

it is for the equivalence
if you say that multiply(arr,n) is equal to arr[n] multiplied the function call with different parameters, you can’t use again n

Hi guys, Thanks for the replies. Sometimes it can be really difficult to ask a question correctly, but after some thought if figured that my confusion arose from the original for loop used to solve the task:

multiply the elements from 0 to n inclusive in an array to create the product of those elements

function multiply(arr, n) {
var product = arr[0];
for (var i = 1; i <= n; i++) {
product *= arr[i];
}
return product;
}

which caused me to ask where does n - 1 come from in the solution using recursion? Of course the answer is simply:

in the for loop we are counting up to the value of n
&
in the recursive function we are counting down from the value of n.