Check out the examples.

Function Factorial(n) If n == 1 Then Return 1 EndIf Return n * Factorial(n-1) End Print Factorial(5)

Online Editor

Write and compile code online!