What is the main difference of both of these methods,are they both the same thing?
Це запитання позначене
1
Відповісти
6560
Переглядів
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Реєстрація| Related Posts | Відповіді | Переглядів | Дія | |
|---|---|---|---|---|
|
|
1
лист. 22
|
3446 | ||
|
|
1
лист. 22
|
3600 | ||
|
|
0
груд. 20
|
58 | ||
|
|
1
бер. 25
|
2846 | ||
|
|
0
січ. 22
|
3980 |