Quote:
I'm new to coding and just now learning recursion.
First of all, you need to learn what is recursive, how to recognize a recursive problem/algorithm. When a problem os not recursive by nature, it is a no go.
"Recursion occurs when a thing is defined in terms of itself or of its type."
Recursion - Wikipedia[
^]
Quote:
How do I perform this function recursively?
Not all problems are defined in terms of recursive, and I don't see anything recursive in this code.