Write factorial(n) using a loop (factorial of 0 is 1).
factorial(n)
factorial(5) → 120
factorial(0) → 1
Submit runs 5 tests, including hidden edge cases.
Run your code to see the output here.