Lesson

Refactor Inheritance with JavaScript Classes to Object Composition with Factory Functions

The ES6 class keyword is just a neat syntax for creating constructor functions in JavaScript. The issue is that constructors force us to write tightly coupled code. In this lesson, we check out the use of factory functions and how they can be used to solve...

Duration
3 min
Access
Free
Transcript
Available

The ES6 class keyword is just a neat syntax for creating constructor functions in JavaScript. The issue is that constructors force us to write tightly coupled code. In this lesson, we check out the use of factory functions and how they can be used to solve the issues that constructor's bring about.