Dependency Injection is the technique in which an object receives other object in which it depends on. In JavaScript, the dependency is abstracted even from the caller and given to a new object, which is usually called an Injector. JavaScript provides us lots of flexibility when it comes to grouping functionalities. Many times, you won't even need to use a class and just using a function might be enough.

3m read timeFrom dev.to
Post cover image

Sort: