Mental Model
A function calls itself with a smaller number until it reaches 1, then multiplies all those numbers back up.
Analogy: Imagine stacking blocks by asking a friend to stack one less block until only one block is left, then stacking them back up together.
factorial(3)
↓ calls factorial(2)
↓ calls factorial(1)
↓ returns 1
← multiply 2 * 1 = 2
← multiply 3 * 2 = 6
result = 6