In recursion, you want to "reduce" the problem into a simpler problem until the problem becomes so trivial you can instantly return the answer.

So, take the number 1234


sumOfDigits(1234) = 4...