Answer the question
In order to leave comments, you need to log in
Recursion, why in return multiplication?
Good day.
Help me understand the algorithm of actions, a recursive function call:
Why do we multiply x by our function?
After all, logically, this call should go through x times until n !== 1.
Answer the question
In order to leave comments, you need to log in
If there is no multiplication, then what will be returned from the head function?
pow(2, 3): // 8
return 2 * pow(2, 2): // 2 * (2 * 2)
___________return 2 * pow(2, 1): // 2 * 2
______________________return 2 // 2
pow(2, 3): // 2
return pow(2, 2): // 2
_______return pow(2, 1): // 2
______________return 2 // 2
I’ll add the Alexander
option , it would be nice to make a background with the first second of the video, after loading, replace it with video playback.
In addition, it would not be superfluous to reduce the size of the video (asap) and use a CDN.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question