Duration
3 min
Access
Pro
Transcript
Available

Factory functions can be powerful ways of abstracting away difficult inheritance situations. They are simply functions that return objects in a desired state. Let’s refactor some objects that share duplicated code to a reusable factory function.