Expedia Group Interview Question

Write a function that can be used to generate factorials.