Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 471 Bytes

creationalPatterns.md

File metadata and controls

19 lines (14 loc) · 471 Bytes

Creational patterns

Creational patterns abstract the instantiation process. They become more important as systems depend more on composition rather than class inheritance. They are used to simplify the creation of objects to make them more adaptable to different situations.

There are a few types of creational patterns:

  • Abstract Factory
  • Singleton
  • Builder
  • Prototype
  • Factory method
const dog = new Dog();

console.log(dog.bark()) // woof