-1

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.?

asked Oct 2, 2010 at 13:32

2 Answers 2

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.

answered Oct 2, 2010 at 13:41
Sign up to request clarification or add additional context in comments.

Comments

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.

answered Aug 20, 2011 at 20:46

1 Comment

Link broken, is there a mirror?

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.