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


Printed on: December 3, 2022 at 22:12 o'clock

Member: colinardo
colinardo Jul 20, 2022 updated at 16:27:29 (UTC)
Goto Top
Hi @SandeepKamra,
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.