This code finds the factorial and calculates exponents. Used to practice Javascript