August 2016
Beginner to intermediate
847 pages
17h 28m
English
In this chapter you learned quite a few ways (patterns) for implementing inheritance and the following table summarizes them. The different types can roughly be divided into:
You can also classify the patterns based on whether they:
|
# |
Name |
Example |
Classification |
Notes |
|---|---|---|---|---|
|
1 |
Prototype chaining (pseudo-classical) |
Child.prototype = new Parent(); |
|
|
|
2 |
Inherit only the prototype |
Child.prototype = Parent.prototype; ... |