JavaScript Design Pattern - Factory Pattern
✅ Common Pattern of the Recurring Problem
Sometimes creating an object involves much more complex logic than the default constructor can give, such as complex configuration, object caching, sharing or re-using objects,
✅ Solution
Factory Pattern
In a factory pattern, a function creates a new object not with new keyword, but provides