function add(a, b) { return a + b; }
add(2, 3); // always 5 β no side effectsA pure function always returns the same output for the same input and has no side effects.
A pure function always returns the same output for the same input and has no side effects. It doesn't modify external state or depend on it.
Challenge: Implement a pure add function that takes two numbers and returns their sum.