As already mentioned, you need to return recursion(n - 1);
Interesting... Thats hard to wrap my head around. When I return the function I'm expecting the function to break return a value not execute again...
But in the case of n !== 0 your function doesn't return anything.
A recursion is just a plain function call, nothing special. It's not like breaking a loop. The return statement doesn't flush the result through the whole call stack, just because the function called itself. It returns only to its direct caller. And in you case, the topmost function call recursion(10) is one that doesn't return anything, therefore undefined.
return recursion(n - 1);