0

alt text

This is the representation of prototype chain when I created two instances of Book constructor. The screen-shot is taken from "High Performance Javascript - N.C.Jakas". My confusion is about the Book constructor given in the middle (the yellow box with the heading "Book"). As every function in javascript is an instance of Function prototype, shouldn't this box (Book) has a proto property linking it to prototype of Function.?

alter
  • 4,320
  • 7
  • 31
  • 36

2 Answers2

3

Probably that was left out as a simplification. Adding Function to the diagram would distract from the main point the author wants to make (the relationship between the user-created classes).

Additionally it would lead to the question what _proto_ of Function would be, crowding the image further.

The author probably thought the diagram and all the displayed relations were already confusing enough in its current form.

sth
  • 222,467
  • 53
  • 283
  • 367
0

Yeah it would. As correctly pointed out by @sth, probably it has been left out so as to simplify . Here's another example which kind of shows what you wanted.

aditya_gaur
  • 3,209
  • 6
  • 32
  • 43