What is the difference between permutation and combination?
Permutation (nPr) considers order (ABC ≠ BAC), while combination (nCr) does not (ABC = BAC). Use permutations when order matters, combinations when it doesn't.
What is the maximum n value?
JavaScript can safely compute factorials up to 170! (≈ 7.26 × 10³⁰⁶). Beyond that, values exceed the maximum safe integer.