In terms of wrapping your head around recurrsion, the topic was discussed at length here: Replace Loops using Recursion -1 explanation
The use of the ellipses is found in this lesson: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place
I hope these links help somewhat. If not, feel free to ask for clarification on anything.