CodeTiles: Build a Factorial Function

Drag and drop the code blocks to build a factorial function

Drop code block here
Drop code block here
Drop code block here
Drop code block here

Available Code Blocks:

function factorial(n) {
if (n <= 1) return 1;
return n * factorial(n - 1);
}