06
Jul
What we will build In this chapter we will implement our own DI Container in JavaScript. We will create a checkout simulation and we are going to use our DI Container to handle the dependency injection. The services Here is the service classes and the flow of our application. We have a credit card, a shipping bag and then a class that handles the transaction and one that sends the order. // Independent service class CreditCard { owner; address; number; cvc; set(owner, address, number, cvc) { this.owner = owner; this.address = address; this.number = number; this.cvc = cvc; } }…