What is the main difference of both of these methods,are they both the same thing?
Denna fråga har flaggats
1
Besvara
6619
Vyer
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
Njuter du av diskussionen? Läs inte bara, delta också!
Skapa ett konto idag för att ta del av exklusiva funktioner och engagera dig i vår fantastiska community!
Registrera dig| Relaterade inlägg | Svar | Vyer | Verksamhet | |
|---|---|---|---|---|
|
|
1
nov. 22
|
3512 | ||
|
|
1
nov. 22
|
3641 | ||
|
|
0
dec. 20
|
58 | ||
|
|
1
mars 25
|
2916 | ||
|
|
0
jan. 22
|
4091 |