Passing code into the function that depends on it.
Hard to describe. Easy to understand through example.
Benefits: §
- separation of concerns
- thereby all the benefits of that, modularity, etc
Example §
Dependent Code §
With Dependency Injection §
Source §