JavaScript Object Inheritence

Hello,
After working in the book by Kirupa, I have a few questions about the Website Link listed at the end of the chapter (see the bottom part about constructor functions). Firstly, I do not understand what new() does, or what the “prototype” means when we are talking about a function. According to the author, this (function) prototype should not be confused with the inheritance chain prototype, but his explanation is not comforting.

Hi @DaisyHillary - welcome to the forums! :slight_smile:

You are touching upon one of the more tricky parts of the language. These comments by @krilnon may help clarify a bit by looking at how the objects are connected when created via “new”.

Does this help? I can try to create a visualization later tonight to help clarify as well.

Cheers,
Kirupa :parachute: