What is the main difference of both of these methods,are they both the same thing?
Dette spørgsmål er blevet anmeldt
1
Svar
6514
Visninger
Hi,
When extending in Js, instances from the parent class remain untouched, but instances from the new child class will have the extended features.
When you include, you are adding the new features to the prototype of the parent class.
Here is a link to the blog which explains in detail about their difference.
Hope it helps
Kan du lide at diskutere? Læs ikke bare med, deltag aktivt i debatten!
Opret en konto i dag for at få glæde af eksklusive funktioner, og bliv en del af vores skønne fællesskab!
Tilmeld dig| Relaterede indlæg | Besvarelser | Visninger | Aktivitet | |
|---|---|---|---|---|
|
|
1
nov. 22
|
3412 | ||
|
|
1
nov. 22
|
3545 | ||
|
|
0
dec. 20
|
58 | ||
|
|
1
mar. 25
|
2825 | ||
|
|
0
jan. 22
|
3959 |