Goto Top

What is "inheritance" in Javascript?

Can anyone explain to me with simple words the meaning of "inheritance" in JavaScript? If you could give examples that would be too great. You can also share some links related to Inheritance in JavaScript.
Thanks in Advance!

Content-Key: 3380114436

Url: https://administrator.de/contentid/3380114436

Printed on: June 16, 2024 at 06:06 o'clock

Member: colinardo
Solution colinardo Jul 20, 2022 updated at 16:27:29 (UTC)
Goto Top
Hi @3310487509,
inheritance means, that for ex. an object inherits a set of properties or functions from a parent object. A good example for inheritance are javascript classes
So if you inherit a parent class the properties/functions from the parent are made available to current object.

Member: Crowd00
Crowd00 Feb 22, 2023 at 11:14:22 (UTC)
Goto Top
This is very useful. Thank you.