Linked Prototype Diagram

In notebook:
FrontEndMasters Advanced JavaScript
Created at:
2016-10-07
Updated:
2016-10-07
Tags:
Fundamentals JavaScript
diagramThe dotted lines are implied relationships.
It's "nonsense" that ​b1​'s implied ​.constructor​ is ​Foo()​.

The above diagram is actually not complete. There are a lot of built-in objects and functions provided by the language. So the real relationship is much much more complex. The good news is that there's a lot of consistency:

All functions delegate up the prototype chain so they can use ​.call()​, ​.apply()​, ​.bind()​ etc.:
diagramTo take away:

In these diagrams the functions ​Foo()​, ​Bar()​ are just distractions, what we care about are the ​Object​s.