3310487509
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-ID: 3380114436

Url: https://administrator.de/en/what-is-inheritance-in-javascript-3380114436.html

Ausgedruckt am: 24.12.2024 um 17:12 Uhr

colinardo
Lösung colinardo 20.07.2022 aktualisiert um 18:27:29 Uhr
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
https://www.w3schools.com/js/js_class_inheritance.asp
So if you inherit a parent class the properties/functions from the parent are made available to current object.

Regards.
Crowd00
Crowd00 22.02.2023 um 12:14:22 Uhr
Goto Top
This is very useful. Thank you.