Both have their advantages and disadvantages which mainly depends on the programming language.
On a hardware level, Recursion comes with a cost, each time you call a function, the underlying mechanism has to store a pointer to where the program has to jump in the code after the function has finished. Among other things it also has to store the function arguments and local variable. This all is stored on the program Stack.
Some problems however have a much more natural solution while using recursion, for instance the tower of hanoi.
Readability is also an important consideration, to be honest I believe your example can benefit with loops.
An extensive comparison between iteration and recursion is given here.
Which sums up the advantages and disadvantages.