Mixins
This lesson teaches the concept of mixins in JavaScript, their syntax, and their implementation using an example.
We'll cover the following...
What are Mixins?
For a class to call methods from another class it first needs to inherit those methods. The child class extends the parent’s class, inherits its methods, and then invokes them. However, there is a limiting factor: a class can only inherit from another class.
That brings us to the question:
Is there a class whose methods can be inherited by other classes without it having to be their ...