# C2. Inheritance

There are several inheritance-related topics in JavaScript:

1. [Constructor functions](/programming/01-languages/javascript/01-language/c-functions/c2-constructors/01-constructor-function.md) - constructors as factories for instances, similar to classes in other languages.
2. [Constructor `prototype` property](/programming/01-languages/javascript/01-language/c-functions/c2-constructors/02-constructor-prototype.md) - prototypical inheritance.
3. [`constructor` property](/programming/01-languages/javascript/01-language/c-functions/c2-constructors/03-constructor-property.md) - reference to constructor function.
4. [`instanceof` operator](/programming/01-languages/javascript/01-language/c-functions/c2-constructors/04-instanceof-operator.md) - checking prototype chain.
5. [Enforce usage of `new`](/programming/01-languages/javascript/01-language/c-functions/c2-constructors/05-enforce-new.md) - how to guarantee that constructor function called with `new`.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://strctr.gitbook.io/programming/01-languages/javascript/01-language/c-functions/c2-constructors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
