Higher-Order Functions (HOFs) and Callback Functions — theory and examples.
Example 1 — Function as Argument (Callback)
Passing a function as an argument and executing it inside another function.
Example 2 — Function Returning Another Function
createMultiplier returns a new function customized by multiplier.
Example 3 — map(), filter(), reduce()
Common HOFs for array transformations & aggregation.
Example 4 — forEach()
Perform action for each array element (no return value).
Example 5 — Callback Demo
Passing greet to processUser and logging result.