What is the main difference of both of these methods,are they both the same thing?
Этот вопрос был отмечен
1
Ответить
6515
Представления
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
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация| Похожие посты | Ответы | Просмотры | Активность | |
|---|---|---|---|---|
|
|
1
нояб. 22
|
3412 | ||
|
|
1
нояб. 22
|
3546 | ||
|
|
0
дек. 20
|
58 | ||
|
|
1
мар. 25
|
2825 | ||
|
|
0
янв. 22
|
3960 |