In mathematics, the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n.
Create a recursive function factorial(n) that calculates the factorial of n.
Create a recursive function reverseString(str) that gives you the reverse of a string str.
For example, reverseString("lorem ipsum") would give you "muspi merol".
Create a recursive function sumArray(arr) that takes an array of numbers and returns their total.
For example, sumArray[4, 30, 2] would give you 36.