You don’t actually start to sum the elements until n gets to zero. After n = 0 then you start returning and adding the values.
Like with the loop, you iterate n amount of times.
PD: Never mind, thought I was wrong because I had an error, I used parenthesis instead of brackets with the array haha [EDIT] Image fixed