What is the main difference of both of these methods,are they both the same thing?
Această întrebare a fost marcată
1
Răspunde
6489
Vizualizări
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
Îți place discuția? Nu doar citi, alătură-te!
Creează-ți un cont astăzi pentru a beneficia de funcții exclusive și a interacționa cu minunata noastră comunitate!
Înscrie-te| Postări similare | Răspunsuri | Vizualizări | Activitate | |
|---|---|---|---|---|
|
|
1
nov. 22
|
3386 | ||
|
|
1
nov. 22
|
3519 | ||
|
|
0
dec. 20
|
58 | ||
|
|
1
mar. 25
|
2801 | ||
|
|
0
ian. 22
|
3937 |