JavaScript Design Patterns: Factory

Table of Contents Factories encapsulate and separate object creation from the rest of your code. In situations where the creation of an object can be complex »