design-patternsJavaScriptDesign PatternsMediumWhat is the purpose of the Factory pattern?1Create objects without specifying their exact class, encapsulating instantiation logic2Ensure a single instance exists3Notify observers of changes4Add behavior to objects at runtimeBack to list