Pure Function
Pure Function — A pure function always returns the same output for the same input and has no side effects (no external state modification). Pure functions are the foundation of functional programming. They depend only on their arguments and don't modify any external state. This makes them predictable, testable, and parallelizable. React's `useReducer` and Redux rely heavily on pure functions for state management. This term relates to the Function category of the reference. You will meet pure function in practice when working with APIs such as Function.prototype.call(), Function.prototype.apply(), Function.prototype.bind(), Function.prototype.toString(). Related terms: Closure, Hoisting, Event Loop, Prototype Chain, Temporal Dead Zone (TDZ), IIFE (Immediately Invoked Function Expression). Understanding pure function makes the rest of the JavaScript documentation noticeably easier to follow, because the concept recurs across methods, guides, and error messages. Look up more definitions in the JavaScript glossary.