Glossary: Software Design Patterns in JavaScript
Dependency inversion principle (DIP)
Also written: DIP, dependency inversion
The D of SOLID: high-level code such as order rules and low-level details such as printing should both depend on an interface, and you pass the detail in. confirmOrder depends on a Notifier, not on ConsoleNotifier.