Composition Vs. Inheritance In Js: Which Is Better?

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 8

  • @junaidjahan4614
    @junaidjahan4614 Рік тому

    You are so good man! Keep doing this and provide us more valuable content.

  • @86_magical30
    @86_magical30 Рік тому +2

    awesome video BTW 📹

  • @phoenix-tt
    @phoenix-tt Рік тому

    A really good video 💪
    Especially the difference between composition and inheritance is well described.
    I would still disagree with the "For larger projects use inheritance". No, I would say the opposite: never ever use inheritance for large projects. If you do so, you end up with lots and lots of boilerplate code, classes and other entities which you often don't understand anymore.
    In all my projects, I switched to composition, and this solved so many problems. The fact that even the Rust language didn't include inheritance has proven to me that I am on the right course.
    Anyways, a really good example, I am surprised this video has so little views but was still recommended

  • @samyip
    @samyip Рік тому

    Excellent explanation!!

  • @egm5081
    @egm5081 Рік тому

    cool video, one question, why are you passing animalFeatures to the createHuman function? should not be only codeWritingAbility ? the animalFeatures you already have them in createBird()

  • @whatthefunction9140
    @whatthefunction9140 Рік тому

    Love your accent, wish i knew another language

  • @misterl8129
    @misterl8129 Рік тому

    Thx for the video.
    Question; Could be use composition with classes sintaxis or we can't? Have you any videos of this?
    Thank you!

  • @yadav-r
    @yadav-r 6 місяців тому

    Explained very well brother, understood everything. Please if you read this, help me, I am very Depressed. I lack depth in skills, I can little bit of UI UX, graphic , 3D with Houdini, little bit of game dev, but not good in any of it, and by no means a good software developer, I Suck. As such not getting job, lost 2 yrs preparing for gov job. how can i get job in webdev, in real webdev project how depth JS is needed, I get stuck on DSA, i don;t know man, my brain is not working, not sure what to ask. I just want to learn react + js and get a job with decent package. Good day sir,