Factory Pattern With the factory pattern we can use factory functions in order to create new objects. A function is a factory function when it returns a new object without the use of the keyword! Say that we need many users for our application. We can create new users with a , , and property. The factory function adds a property to the newly created object as well, which returns the and the . When to Use - Use this when you need to create multiple objects that share the same properties - This is helpful when object creation depends on a certain environment or configuration When NOT to Use - F…