Dependency Injection in Javascript
· 4 min readThis article explores dependency injection in Javascript using higher-order functions and compares it against dependency injection in classes.
This article explores dependency injection in Javascript using higher-order functions and compares it against dependency injection in classes.
In this post we will use polymorphism to remove switch statements. Inappropriately using switch statements is a sign of code smell.