I'm having a little bit of trouble finding out how my function knows to only multiply base by the base within my recursive call, and not power. Is it because its the first parameter on the recursive call?
I know this works, but I'd expect in powRecurse(2,4), for it to multiply 2 * (2,4) so 4 and 8 being returned in the first iteration.
function powRecurse(base, power) {
if(power === 0) return 1
if(power === 1) return base
return base * powRecurse(base, power - 1)
}