You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Q. Write a function factorial that takes a non-negative integer num as input and returns its factorial. The factorial of non-negative integer n, denoted as n!, is the product of all positve integers less than or equal to n. The factorial of 0 is defined as 1.