Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update article.md#3814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Gleb-Pastushenko wants to merge1 commit intojavascript-tutorial:master
base:master
Choose a base branch
Loading
fromGleb-Pastushenko:patch-5
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion1-js/09-classes/02-class-inheritance/article.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -619,7 +619,10 @@ rabbit.eat(); // Error calling super (because there's no [[HomeObject]])
- We must call parent constructor as `super()` in `Child` constructor before using `this`.
3. When overriding another method:
- We can use `super.method()` in a `Child` method to call `Parent` method.
4. Internals:
4. When overriding class fields, the class field is initialized:
- Before constructor for the base class (that doesn’t extend anything).
- Immediately after super() for the derived class.
5. Internals:
- Methods remember their class/object in the internal `[[HomeObject]]` property. That's how `super` resolves parent methods.
- So it's not safe to copy a method with `super` from one object to another.

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp